opdewapi
v0.0.46
Published
This is a quick exploration of what it takes to write a library using TypeScript. Not much it seems!
Downloads
27
Readme
Example library using TypeScript
This is a quick exploration of what it takes to write a library using TypeScript. Not much it seems!
Simply run npm run build or tsc to compile.
The TypeScript-files .ts in src/ will be compiled into dist as
JavaScript-files .js and separate .d.ts type-declaration files.
Note that I haven't tried publishing this to npm or verified if there are more things to do first.
Related reading
- http://stackoverflow.com/a/38444504/2037928 "How should I use @types with TypeScript 2?"
- http://staltz.com/all-js-libraries-should-be-authored-in-typescript.html
- https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html
- https://www.typescriptlang.org/docs/handbook/compiler-options.html
