Spector.js
Spector.js copied to clipboard
Add TypeScript types to release
Adds typescript types to the release to make it much easier for people to use Spector.js with typescript
Docs on the subject: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html
Looks like we need to do one more step to get this working correctly.
Currently I'm getting the following error when importing this project into a typescript file:
File '.../node_modules/spectorjs/dist/spector.d.ts' is not a module
That's because the declaration file is namespace-based and not module-based. It needs to be changed (regenerated) to support modules
FYI, you can use tsup
to generate type declarations for a bundle.
Any updates?
last I tried tsup was not generating the bundled typings correctly :-( Would really appreciate a contrib on this subject