5 ms·
Could you give links about moving types to npm? Are there any issues in a tracker or a blog?
by solomatov 10y ago
Could you give links about moving types to npm? Are there any issues in a tracker or a blog?
- ihsw 10y agoI 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)
- robwormald 10y agosee https://github.com/Microsoft/TypeScript/issues/8275 https://github.com/Microsoft/TypeScript/issues/8275
- robwormald 10y agoPosted today https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/ https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-f...