2 ms·
TypeScript doesn't require bindings to call JavaScript libraries. This includes writing code to run in the browser and writing Node.js code. Instead, what you
by klodolph 8y ago
TypeScript doesn't require bindings to call JavaScript libraries. This includes writing code to run in the browser and writing Node.js code.
Instead, what you want are type definitions for the library you use. These are optional, but make using a library with TypeScript a much better experience. It is very common for these definitions be available already, whether the library is written in TypeScript or something else. Years ago I remember having to manage these type definitions, these days I don't really have to think about it much.
There's not much of an initial hurdle, to be honest. You're mostly adding annotations to your JavaScript code. It does influence the structure of your code but not as much as you might think, at least in my experience.