Path mappings work, but are rarely used since every downstream TypeScript project also has to set them.
More typical is module declarations.
declare module "N/log" {
}
These are then added by one of:
- Installing under
@types as a npm alias (or having the project in DefinitelyTyped to begin with)
- Adding
typeRoots.
- Referencing the types via tripe slash
/// <reference types="..." />
Note that module declarations is how Node.js typings work (@types/node).
Path mappings work, but are rarely used since every downstream TypeScript project also has to set them.
More typical is module declarations.
These are then added by one of:
@typesas a npm alias (or having the project in DefinitelyTyped to begin with)typeRoots./// <reference types="..." />Note that module declarations is how Node.js typings work (
@types/node).