Ynot Dev
New Features in NodeJS
Loading Env files
Node.js can now load an env file either by specifying it in the command line (--env-file) or programmatically through process.loadEnvFile API.
Advanced TypeScript Types
Variance annotations
When TypeScript checks whether one generic type is assignable to another, it normally has to inspect how the type parameter is actually used inside the type, which can get slow (or ambiguous) for large or recursive generics. Variance annotations let you tell the compiler upfront how a type parameter is used, so it doesn’t have to work that out on its own.
Git Tips and Tricks
Commit fixups
If you want to make a change to a previous commit, we can do it by interactive rebase (git rebase --interactive).
But if we do it that way, you have to push an entirely new set of commits and if you have already submitted the changes for review, it will be hard on reviewers since they have to review the whole set again.
TypeScript Configuration
There are a lot of options to tweak TypeScript behavior.
These are the options that I have found very useful.