-
Notifications
You must be signed in to change notification settings - Fork 313
Create Node-Target-Mapping.md #182
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
Conversation
Oh, hey, it's my own PR - nice. Yeah, this is still worth having IMO |
@orta It might also be a good idea to also mention I often use |
Include node 12 as well? |
Seems like this is something that should be automated with a script? There are way too many individual flags to check |
Honestly, there's a good argument for having these as options inside TypeScript itself (though it looks like that failed to stick) but I don't think this is just scriptable TBH there's not really two tables of definitions for features in node vs in TS. Just gotta do the grunt work to make sure they're in line for the docs. |
One thing that might be difficult to get right is that Node 10 might get a new feature in Node 10.5 for example so settings target=node10 would be a moving target. Although, there is precedent for such a flag: The problem is that you don't know if the user wants to target Node 10.1 or 10.5 and this would break at runtime which is much worse than strict which breaks at compile time. Documenting is a good first step, but to add these settings into tsc will take some careful thought. |
Just doing whatever |
Link to the live page for convenience: |
If anyone wants to try the latest, not LTS version, on my personal apps I've been using latest Node (13.8.0) with native ES modules and with target |
This is the bare minimum to get some docs started for the node lib/target mapping.
Related: