-
-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help! My Types Are Missing! (tsc vs ts-node disparity) #866
Comments
Why don't you just run it with |
Looking back now that you've told me the solution; for a few different reasons;
On the About compilation latency; it's irrelevant for me since nextjs is the second thing that starts, and I presume that starts a second typescript compiler all on its own inside the express process, and that means I have to wait for it to fully type-check every file in my project anyway. That's where I have latency (about 40 seconds of it) that I would like to reduce, if any. |
It does and did, I think the configuration of
Yes, this is how it works today. Except all these details are within TypeScript and not
Wouldn't this imply that running two compilers would actually run at 2x 40s? |
The reason I offered |
Using
node v11.12.0
andts-node v8.3.0
, I get different behaviour betweentsc
running inside a langauge server in vscode3.5.2
(node_modules has3.5.3
) for extended interfaces, when running withnode -r ts-node/register
.The full command line is:
TS_NODE_PROJECT=tsconfig.server.json node --inspect=9229 -r ts-node/register server/index.ts
.tsconfig.json
has contents:and
tsconfig.server.json
:does not apply, but causes an error. Folder structure;
Contents of
index.d.ts
:Error:
workaround that makes it work:
This means that
ts-node
when used viats-node/register
does not load the typescript definitions from the configured folders.This issue has a long discussion showing approximately the same:
#782 (comment)
Yes, I have read the docs, both the handbook and the readme about types; hence the pun in the title of this issue. I think it's an issue since ts-node and the ts lang server diverge.
The text was updated successfully, but these errors were encountered: