4 ms·
I don't know about moving all of the current typings to beneath an NPM org, but TypeScript can look for the `typings` field in a package's package.json file. h
by ihsw 10y ago
I don't know about moving all of the current typings to beneath an NPM org, but TypeScript can look for the `typings` field in a package's package.json file.
https://github.com/ihsw/toxiproxy-node-client/blob/master/package.json#L6 https://github.com/ihsw/toxiproxy-node-client/blob/master/pa...
An NPM package will be typed and you won't have to download typings separately. It may be improper to publish typings with your code instead of letting the user install them separately, but at that point it ceases being clean.
In this case, my `toxiproxy-node-client` package is written in TypeScript and the typings are published alongside the built package files. Compatibility between ES6 and TS is maintained.
- camwest 10y agoTypeScript 1.8x already looks for "typings" in package.json
- robwormald 10y agoyep, this method works great for libraries authored in typescript (and/or those that take the time to provide external module-style typedef files), but the @typings would be for what tsd/typings does today (mostly ambient)