GeneratorConfig Module
Functions and values
| Function or value |
Description
|
Full Usage:
derivedRuntimePackage packageName
Parameters:
string
Returns: string
|
The npm package a binding's imports name at runtime, derived from the package the declarations were generated from. A DefinitelyTyped package ships no JavaScript, so an import that names it resolves to nothing at all: `@types/three` carries the types and `three` carries the code. The derivation is DefinitelyTyped's own naming convention, which is the only thing on disk that says what the runtime is called - a `@types/*` manifest has no field for it: - `@types/three` -> `three`; - `@types/babel__core` -> `@babel/core`, because DT mangles a scope into the name by folding `@scope/name` to `scope__name` (it publishes one flat `@types` scope, so it has nowhere else to put the scope); - anything not under `@types/` is its own runtime, unchanged. The mangling is only ambiguous against an unscoped package whose own name contains `__`, which DefinitelyTyped's convention cannot express either; `runtime` in `xantham.json` overrides the whole derivation for that and for every other package the convention does not describe.
|
Full Usage:
disposition config origin
Parameters:
GeneratorConfig
origin : PackageId
Returns: GroupDisposition
|
A group's effective disposition: the entry always ships, everything else is `widen` unless configured (the default flips to `reference` once the shipped compiler-lib package exists - O7).
|
|
The key a group is addressed by under `xantham.json`'s `groups`; `None` for the groups that are not configurable (the entry package always ships).
|
|
|
|
Loads a configuration file, tolerating comments and trailing commas (the file is authored by hand). A missing file is the default configuration, not an error.
|
Full Usage:
runtimePackage config packageName
Parameters:
GeneratorConfig
packageName : string
Returns: string
|
The configured runtime package, or the derived one. What every `[
|