Skip to content

Fix pdf_viewer definitions #13913

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

Merged
merged 1 commit into from
Aug 20, 2021
Merged

Fix pdf_viewer definitions #13913

merged 1 commit into from
Aug 20, 2021

Conversation

michael-yx-wu
Copy link
Contributor

@michael-yx-wu michael-yx-wu commented Aug 20, 2021

Follow up to #13588

Current pdf_viewer definitions result in errors like the following when trying to use them in a ts project:

[error] TypeScript error node_modules/.pnpm/[email protected]/node_modules/pdfjs-dist/web/pdf_viewer.d.ts:1:15 - error TS2691: An import path cannot end with a '.d.ts' extension. Consider importing 'pdfjs-dist/types/web/pdf_viewer.component.js' instead.

1 export * from "pdfjs-dist/types/web/pdf_viewer.component.d.ts";

Import/export statements in typescript should not include file extensions.

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include the information from #13913 (comment) in the commit message as well.

Current pdf_viewer definitions result in errors like the following when
trying to use them in a ts project:

[error] TypeScript error
node_modules/.pnpm/[email protected]/node_modules/pdfjs-dist/web/pdf_viewer.d.ts:1:15
- error TS2691: An import path cannot end with a '.d.ts' extension.
Consider importing 'pdfjs-dist/types/web/pdf_viewer.component.js'
instead.

1 export * from "pdfjs-dist/types/web/pdf_viewer.component.d.ts";

Import/export statements in typescript should not include file extensions.
@michael-yx-wu
Copy link
Contributor Author

Thanks for the review! I've amended the commit message.

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I don't really know TypeScript, the changes look reasonable enough; thank you for the patch!

@Snuffleupagus Snuffleupagus merged commit 6b2c913 into mozilla:master Aug 20, 2021
@michael-yx-wu michael-yx-wu deleted the mw/fix-typings branch August 20, 2021 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants