-
Notifications
You must be signed in to change notification settings - Fork 10k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename *.d.ts to *.d.mts. Close #17241
Add a type test for legacy. - https://www.typescriptlang.org/docs/handbook/modules/reference.html#file-extension-substitution
- Loading branch information
Showing
10 changed files
with
41 additions
and
12 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "../../types/web/pdf_viewer.component.js"; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "../types/web/pdf_viewer.component.js"; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { getDocument } from "pdfjs-dist/legacy/build/pdf.mjs"; | ||
import { EventBus } from "pdfjs-dist/legacy/web/pdf_viewer.mjs"; | ||
|
||
class MainTest { | ||
eventBus: EventBus; | ||
task: ReturnType<typeof getDocument> | undefined; | ||
|
||
constructor(public file: string) { | ||
this.eventBus = new EventBus(); | ||
} | ||
|
||
loadPdf() { | ||
this.task = getDocument("file://" + this.file); | ||
return this.task.promise; | ||
} | ||
} | ||
|
||
// This is actually never called, as the test only consists in compiling the file. | ||
// The compilation will crawl through all files and make sure that the types are consistent. | ||
const mt = new MainTest("../pdfs/basicapi.pdf"); | ||
mt.loadPdf().then(() => { | ||
console.log("loaded"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "module", | ||
"dependencies": { | ||
"pdfjs-dist": "../../build/typestest/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters