2 ms·
> Why are there no guides on the typescript site about library developers? What about a guide on the recommended tools for a library developer? One interesting
by paulddraper 4y ago
> Why are there no guides on the typescript site about library developers? What about a guide on the recommended tools for a library developer?
One interesting thing about Typescript is that it prefers .ts to .d.ts files.
So if you ship you .js, .js.map, .ts, and .d.ts files next to each other, your downstream consumers will be running expensive type inference on the .ts.
Instead, you have to manipulate package.json entries so that the .ts and the .d.ts are separate. (Or inline sources into source maps and exclude .ts from the package.)