mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-06 13:11:46 +00:00
Handle mutating promise return types in PDF.js. (#9431)
This commit is contained in:
committed by
Masahiro Wakame
parent
c851b46f11
commit
f3fb377beb
@@ -43,3 +43,10 @@ function goNext() {
|
||||
renderPage(pageNum);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Test PDFPromise allows return value mutation
|
||||
//
|
||||
var promise: PDFPromise<string> = PDFJS.getDocument('helloworld.pdf').then(pdf => {
|
||||
return "arbitrary string";
|
||||
});
|
||||
Vendored
+1
-1
@@ -32,7 +32,7 @@ interface PDFPromise<T> {
|
||||
isRejected(): boolean;
|
||||
resolve(value: T): void;
|
||||
reject(reason: string): void;
|
||||
then(onResolve: (promise: T) => void, onReject?: (reason: string) => void): PDFPromise<T>;
|
||||
then<U>(onResolve: (promise: T) => U, onReject?: (reason: string) => void): PDFPromise<U>;
|
||||
}
|
||||
|
||||
interface PDFTreeNode {
|
||||
|
||||
Reference in New Issue
Block a user