This repository has been archived by the owner on Jul 28, 2021. It is now read-only.
[UNFINISHED] Use ts-node to register on-the-fly TS support #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is not done seeing as there's a decision to make about when to enable type checking. Should it use a command line flag? Environment variable? Both? Some kind of complex series of checks to Do the Right Thing™?
The core of this change is just adding in
ts-node
since they do a fantastic job of making all this work, and there's no reason to replicate the ~500 lines of code they have.Note that new tink projects will need to install
@types/node
orts-node
and have a simple tsconfig.json if they intend to use JSX"There's also still the issue of typescript expecting to traverse node modules to find type definitions, so those will have to be fetched manually for now, I guess?
Also a random note but
tink sh
is giving me a stack overflow on Windows (!).Another thing, right now it seems that tink shows the usage screen whenever an exception is thrown. This means that type errors are accompanied by like 10 lines of help on screen which are very distracting. Something needs to be done about that for this case, in my opinion.