New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is the meaning of the versions in definitely typed packages #13225
Comments
The policy for version numbers is to try to keep the first two numbers in line. @types/lodash being at 4.14.x means that it should work with lodash 4.14 and above. The last digit reflects updates to the package structure (IE: maybe someone made a more accurate type definition to the 4.14 changes). Given that DT is community supported, it seems that one of the following must be true:
I would guess its #2. As to @types/lodash-3, the way that modules are resolved, you would need to be performing something like |
Thank you for your great answer. This question comes in my mind because recently an update to lodash typings broke my code (34124e0). Apparently, we should write more tests for lodash typings. |
For context, this other thread makes it sound as if the policy of trying to keep version numbers somewhat in sync is only followed by some packages. |
I think versions of definitely typed packages should not match the version of the real package. For example in the time I am writing this issue latest version of
lodash
is '4.17.2and the latest version of
@types/lodashis
4.14.43. This probably means that the typings are for
lodash-v4.14.43`. So it is confusing when we want to change a typings package because there are no good ways to increment the typings package because it is meant to be the real version of the package. This will break installing npm packages in many of the projects.I suggest to typings packages not follow the exact versions of the real packages. For example:
lodash version:
4.14.43
@types/lodash version:
4.1.1
But in the .d.ts file we should explicitly write the compatible lodash package version.
Also we can have
@types/lodash-3
etc for older version of lodashThe text was updated successfully, but these errors were encountered: