4 ms·
The two things coming in 2.0 that most excite me are - moving types to npm (despite the great work of Blake on typings, managing type definitions is still out
by robwormald 10y ago
The two things coming in 2.0 that most excite me are
- moving types to npm (despite the great work of Blake on typings, managing type definitions is still out of band) - npm install @types/somelib will be great.
- AST transforms, which will open up some interesting options for bundling and optimizations, sort of like babel's plugin ecosystem.
- solomatov 10y agoCould 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...
- ilovecomputers 10y agoIf that first feature is true, it will bring me back to TypeScript. Honestly, my major deterrence of TypeScript was managing both 3rd party libraries and typing files.