-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
ts-node "compiles" all TypeScript files upon boot up #16
Comments
You're definitely correct and I was thinking about this after you logged it. We need to load all the files by default, since there could be type information in the files array. However, it should be possible to filter those to only Awesome point 👍 Do you have any thoughts on filtering the results for only |
I don't have enough background here to understand why it's necessary? I imagined that |
For interested parties: I'm using the TypeScript language services which requires entry points and definition files on load (E.g. to declare modules, etc). However, since this isn't I'll be implementing a patch for this tonight in any case, but if someone has a better approach please chime in 😄 Otherwise I'll be implementing a flag in The issue from #13 was that when |
Thanks for the explanation! Is it possible to separate how REPL and |
Most of the code would end up identical in either case, so it's not a huge change. I'd be able to wrap either API internally depending on whether we're using the REPL interface too. It is probably lighter, just how much I haven't tested. @basarat Do you have any idea how much lighter using only the program interface over the language services would be? @alexgorbatchev There's a lot of other things to consider with a change like that. For example, when someone invalids the node require cache this would require restarting a new program instance which would be much slower and would result in potentially different state/errors. These are all probably reasonable trade-offs though, but I'd love to solve it better, not just differently. |
Not a significant difference at all. Language Service is mostly a |
Released with |
very cool, thank you very much! |
I'm using
ts-node
to getgulpfile.ts
to work and it appears thatts-node
compiles all TypeScript files whengulp
starts. If I have errors in clientside files that aren't required anywhere in thegulpfile.ts
file, gulp still fails to start becausets-node
fails with TypeScript errors.I have my clientside files linked in
tsconfig.json
, which might be causing this side effect. I'm worried that eventually when the project gets larger it will become a real problem becausets-node
will unnecessarily compile all TypeScript files.The text was updated successfully, but these errors were encountered: