Closed Elephant-Vessel closed 5 years ago
The project is avoiding to define global environment types. It's up to the user to provide them (similarly to the JS lib or DOM definitions). Types from @types
are a special case since they're from the DT mono-repo which enforces a single @types/node
version across all its packages. Defining an explicit dependency on a given version of @types/node
may cause issues for users using a different major version of Node (due to the global nature of these types).
We could explore adding @types/node
with a *
range, but I am not sure if it is worth it.
Add @types/node
to your dev-dependencies if you wish to use this lib in Node.
This ...
... errors in the log when I'm building my typescript project as these modules are not defined, as I've had no need for the types of node. When I manually added @types/node to my project, I could build without the index.d.ts of async-done writing errors in the log.