Remove the unofficial TypeScript definitions from DefinitelyTyped
See original GitHub issueCurrently there’s unofficial, likely unmaintained, and out-of-date TypeScript definitions published via https://github.com/DefinitelyTyped/DefinitelyTyped for the pdfjs-dist
library; see https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdfjs-dist
Now that we, from version 2.6.347
, are shipping official TypeScript definitions through https://github.com/mozilla/pdfjs-dist, it’d be a good idea to submit a PR to DefinitelyTyped to remove its TypeScript definitions; see https://github.com/DefinitelyTyped/DefinitelyTyped#removing-a-package
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
@types/find-remove - npm
TypeScript definitions for find-remove. ... Start using @types/find-remove in your project by running `npm i @types/find-remove`.
Read more >How to replace @types/jest with @jest/globals and jest-mock
I believe that it's always better to prefer official type definitions rather than unofficial DefinitelyTyped. And Jest v27 introduced new ...
Read more >tsd - How do I remove typescript definition? - Stack Overflow
Running tsd reinstall --clean will eliminate the definitions not found in tsd.json . Please note that tsd is deprecated.
Read more >How to add type definitions to a TypeScript project | Dave Voyles
So it got the jQuery type definition from the remote DefinitelyTyped repository, and installed it in my local project. typings-directory.
Read more >Google Publisher Tags add official TypeScript type definitions
Until now, a number of community-led projects such as @types/doubleclick-gpt and @types/googletag have provided unofficial GPT type definitions.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For PDF.js v2.6.347, you can import them with the following:
The official TS definitions bundled in 2.6.347, while much appreciated, only include bindings for the top-level API and therefore lack many of the useful types currently exposed by the DefinitelyTyped definitions, such as:
PDFPageProxy
PDFDocumentProxy
PDFRenderTask
PDFDocumentLoadingTask
It’s possible to access these types through the official definitions by using complex sequences of type operations, e.g.:
However, this is inconvenient and also unconventional within the TypeScript ecosystem. Type definitions for libraries usually export typings for important objects/classes (without exporting their values).
Would you consider exposing these types in the official type definitions before removing the typings from DefinitelyTyped?