-
-
Notifications
You must be signed in to change notification settings - Fork 542
Closed
Description
Expected Behavior
Same as tsc or documented in "My Types Are Missing"
According to https://www.typescriptlang.org/tsconfig#types :
This option does not affect how @types/* are included in your application code
Actual Behavior
When both types
and typeRoots
are specified, tsc
resolves imported types from typeRoots
, but ts-node
does not. It is not documented.
ts-node --files src/index.ts
resolves the types, but it's not clear why, as neither include
nor files
are used.
Without types
ts-node src/index.ts
resolves types in typeRoots
as well as tsc
does.
Steps to reproduce the problem
Run ts-node src/index.ts
in the reproduction below
Minimal reproduction
Specifications
- ts-node version: 9.0.0
- node version: 12.14.0
- TypeScript version: 4.0.3
- tsconfig.json, if you're using one:
{
"compilerOptions": {
"strict": true,
"esModuleInterop": true,
"outDir": "dist",
"types": ["node"],
"typeRoots": ["node_modules/@types", "src/typings"]
}
}
- Operating system and version: Ubuntu 18.04.5 LTS
FossPrime
Metadata
Metadata
Assignees
Labels
No labels