Hacker News new | ask | show | jobs
by jdmichal 4123 days ago
> Haven't looked at TypeScript's interop with JS.

All JavaScript is valid TypeScript. This was one of the founding tenants for TypeScript. So interop is "just use the JS".

You can optionally also provide a binding file that tells TypeScript about the JS code so that it can perform compile-time checking on calls. There is a repository of these bindings for common libraries called DefinitivelyTyped [0].

> ... They only had a huge language spec PDF and not a single tutorial or something easier to digest.

Not sure when you originally looked, but there is now a tutorial [1], handbook [2], and samples [3] in addition to the language spec [4].

[0] https://github.com/borisyankov/DefinitelyTyped

[1] http://www.typescriptlang.org/Tutorial

[2] http://www.typescriptlang.org/Handbook

[3] http://www.typescriptlang.org/Samples

[4] http://www.typescriptlang.org/Content/TypeScript%20Language%...