Hacker News new | past | comments | ask | show | jobs | submit login

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.




If 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.


Could you give links about moving types to npm? Are there any issues in a tracker or a blog?



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/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.


yep, 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)


TypeScript 1.8x already looks for "typings" in package.json





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: