1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
Types in this package
=====================
Right now we only package a subset of what upstream has, because it would be
crazy to package it all in one Debian package. However, feel free to extend
this subset within reason.
Caveats
=======
Out-of-sync with Debian
-----------------------
Sometimes the type definitions here are out-of-sync with the corresponding
javascript library in Debian. This is an inherent flaw with the upstream
package as well as the surrounding ecosystem; this cannot be fixed in Debian.
However, most of the time it should still work, i.e. the typechecks should
still succeed with the (likely newer) types in this package, and the overall
behaviour should be unaffected. If this doesn't work out for you, please file a
bug to the upstream package to fix the situation on their end.
Out-of-sync with each other
---------------------------
Yes, this is the shoddy nature of the npm ecosystem.
If you blindly link the whole of /usr/lib/nodejs/@types to node_modules in
your package's source or build directory, you *may* get spurious build failures
like "Cannot find name [some core Javascript thing, like Array or Promise]".
This is very likely due to the fact that types from some packages are
targetting different versions of TS, or JS, or whatever. Instead, you should
create a node_modules directory and link only specific subdirectories of
/usr/lib/nodejs/@types into it (check your package.json for @types/*
devDependencies), and point your package build to this.
If you still get failures, check the declared versions. If they significantly
mismatch the nes packaged here, file a bug report about it and we will try to
figure out a solution.
|