Should the library also be compatible with Typescript projects?
I am developing a Typescript library that utilizes node-fetch
and @types/node-fetch
, which will be shared through an internal NPM registry within the company.
If I only include @types/node-fetch
as a dev-dependency, users of the library who are also using Typescript in their projects will have to manually install the missing types since dev-dependencies are not automatically included.
The solution I currently have is to declare @types/node-fetch
as a regular dependency, but it seems unusual (as types are typically not needed for runtime operations).
Is this the correct approach, or is there a better way to handle this situation?