Home > @rushstack/node-core-library > INodePackageJson > typesVersions
INodePackageJson.typesVersions property
A table of TypeScript *.d.ts file paths that are compatible with specific TypeScript version selectors. This data take a form similar to that of the INodePackageJson.exports field, with fallbacks listed in order in the value array for example:
"typesVersions": {
">=3.1": {
"*": ["./types-3.1/*", "./types-3.1-fallback/*"]
},
">=3.0": {
"*": ["./types-legacy/*"]
}
}
or
"typesVersions": {
">=3.1": {
"app/*": ["./app/types-3.1/*"],
"lib/*": ["./lib/types-3.1/*"]
},
">=3.0": {
"app/*": ["./app/types-legacy/*"],
"lib/*": ["./lib/types-legacy/*"]
}
}
See the TypeScript documentation for details.
Signature:
typesVersions?: Record<string, Record<string, [string, ...string[]]>>;