https://github.com/itsfarseen/ts-node-repro
https://github.com/itsfarseen/ts-node-repro
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/itsfarseen/ts-node-repro
- Owner: itsfarseen
- Created: 2021-08-07T13:34:59.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-07T13:59:31.000Z (almost 5 years ago)
- Last Synced: 2025-03-08T21:11:23.463Z (over 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# TS Node Repro
## Issue
.d.ts files are ignored when `allowJs && checkJs`
Works fine when either of them are set to false.
## Run
```bash
cd ./myapp-bar
yarn tsc # produces no error
node --loader ts-node/esm main.ts # errors
```
## Error shown
```
(node:700514) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
/home/farseen/Projects/97.Temp/ts-node-types/node_modules/ts-node/src/index.ts:618
return new TSError(diagnosticText, diagnosticCodes);
^
TSError: ⨯ Unable to compile TypeScript:
../myapp-foo/dist/foo.js:1:23 - error TS7031: Binding element 'foo' implicitly has an 'any' type.
1 export function foo({ foo }) {
~~~
at createTSError (/home/farseen/Projects/97.Temp/ts-node-types/node_modules/ts-node/src/index.ts:618:12)
at reportTSError (/home/farseen/Projects/97.Temp/ts-node-types/node_modules/ts-node/src/index.ts:622:19)
at getOutput (/home/farseen/Projects/97.Temp/ts-node-types/node_modules/ts-node/src/index.ts:809:36)
at Object.compile (/home/farseen/Projects/97.Temp/ts-node-types/node_modules/ts-node/src/index.ts:1111:30)
at /home/farseen/Projects/97.Temp/ts-node-types/node_modules/ts-node/src/esm.ts:146:38
at Generator.next ()
at /home/farseen/Projects/97.Temp/ts-node-types/node_modules/ts-node/dist/esm.js:8:71
at new Promise ()
at __awaiter (/home/farseen/Projects/97.Temp/ts-node-types/node_modules/ts-node/dist/esm.js:4:12)
at transformSource (/home/farseen/Projects/97.Temp/ts-node-types/node_modules/ts-node/dist/esm.js:88:16)
```