node/is-core-module/index.d.ts
raw| 1 | import RawData from './core.json'; |
| 2 | |
| 3 | // `string & {}` still accepts any string, but lets editors suggest `isCore.Module` names |
| 4 | declare function isCore(specifier: isCore.Module | (string & {}), nodeVersion?: string): boolean; |
| 5 | |
| 6 | declare namespace isCore { |
| 7 | export type Module = keyof typeof RawData; |
| 8 | |
| 9 | export type Data = Record<Module, typeof RawData[Module]>; |
| 10 | } |
| 11 | |
| 12 | export = isCore; |