1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-24 17:18:07 +02:00
pdf.js/test/types
Tim van der Meij ccfaf20ee2
Install and use the most recent Node types for the types tests
The types tests run in Node.js and therefore use Node types for e.g.
builtins. However, we didn't explicitly indicate this in
`tsconfig.json` (see [1] for more information and [2] for the PR where
we found this). Moreover, we didn't explicitly install the most recent
version of `@types/node` which implicitly made us fall back to version
14.14.45 (because that was installed as a dependency of other modules)
whereas much newer versions are available and we need those after
changes in Node.js (see [3] for more information and [4] for the PR
where we found this).

This commit fixes both issues by explicitly installing and using the
most recent Node.js types, which should also avoid future issues with
the types tests.

[1] https://github.com/TypeStrong/ts-node/issues/1012
[2] https://github.com/mozilla/pdf.js/pull/18237
[3] https://stackoverflow.com/questions/78790943/in-typescript-5-6-buffer-is-not-assignable-to-arraybufferview-or-uint8arr
[4] https://github.com/mozilla/pdf.js/pull/18959
2024-11-03 13:40:55 +01:00
..
legacy.ts Rename *.d.ts to *.d.mts. Close #17241 2023-11-12 07:30:36 +09:00
modern.ts Rename *.d.ts to *.d.mts. Close #17241 2023-11-12 07:30:36 +09:00
package.json Rename *.d.ts to *.d.mts. Close #17241 2023-11-12 07:30:36 +09:00
tsconfig.json Install and use the most recent Node types for the types tests 2024-11-03 13:40:55 +01:00