I have an npm package for NodeJS that is implemented in (plain and not compiled) JavaScript and uses JSDOC type annotations to type check the code using TypeScript and this works like a charm. When using the above package in another project by adding it as a dependency, it seems as if TypeScript would no longer use the JSDOC type annotation in the source of the package but rather demands a declaration file.
typescript - Import JSDOC type annotations from a JavaScript npm package - Stack Overflow
评论列表(0)
- 暂无评论