Reputation: 932
I am the process of writing my first TypeScript-based NPM module. When I am done, it will be exported through "main"
in package.json
, and this field will point at the compiled, plain javascript.
So when I require this module in another TypeScript module, IntelliSense and type checking will not work for my module, right?
So one solution would be to add a definition file. But definition files are for JS libs, right? It shouldn't be necessary to write a definition file for a TS project, right?
So... how am I going to export my definitions along with my project?
Upvotes: 0
Views: 39
Reputation: 932
It seems I just need to add "declaration": true
to my tsconfig.json
. Pretty simple.
Upvotes: 2