3 ms·
> Is it not a problem in practice when TS type declarations and their associated JS code are written by different people at different times for different versio
by geon 9y ago
> Is it not a problem in practice when TS type declarations and their associated JS code are written by different people at different times for different versions of a library?
It can be. But most popular libraries have very good version syncing, or even include definitions in the module itself. In the worst case, or if there are no typings available at all, you can just import the plain js, and use it untyped, which can be acceptable if it is not used in a lot of places.
> didn't seem to have any formal reference to a specific version
Yeah. It mostly works if you install the latest version of them both at the same time. Sometimes I've had to fiddle with backing the definition or the module back a version to get them to match.