Skip to content

Commit b1f2216

Browse files
committed
add typings
1 parent 6987404 commit b1f2216

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

index.d.ts

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,14 +441,37 @@ export interface IOSApi {
441441
* Open a file in {@link https://developer.apple.com/reference/uikit/uidocumentinteractioncontroller UIDocumentInteractionController},
442442
* this is the default document viewer of iOS, supports several kinds of files. On Android, there's an similar method {@link android.actionViewIntent}.
443443
* @param path This is a required field, the path to the document. The path should NOT contains any scheme prefix.
444+
* @param {string} scheme URI scheme that needs to support, optional
444445
*/
445-
previewDocument(path: string): void;
446+
previewDocument(path: string, scheme?: string): void;
446447

447448
/**
448449
* Show options menu for interact with the file.
449450
* @param path This is a required field, the path to the document. The path should NOT contains any scheme prefix.
451+
* @param {string} scheme URI scheme that needs to support, optional
450452
*/
451-
openDocument(path: string): void;
453+
openDocument(path: string, scheme?: string): void;
454+
455+
/**
456+
* Displays an options menu using [UIDocumentInteractionController](https://developer.apple.com/reference/uikit/uidocumentinteractioncontroller).[presentOptionsMenu](https://developer.apple.com/documentation/uikit/uidocumentinteractioncontroller/1616814-presentoptionsmenu)
457+
* @param {string} path Path of the file to be open.
458+
* @param {string} scheme URI scheme that needs to support, optional
459+
*/
460+
presentOptionsMenu(path: string, scheme: string): void;
461+
462+
/**
463+
* Displays a menu for opening the document using [UIDocumentInteractionController](https://developer.apple.com/reference/uikit/uidocumentinteractioncontroller).[presentOpenInMenu](https://developer.apple.com/documentation/uikit/uidocumentinteractioncontroller/1616807-presentopeninmenu)
464+
* @param {string} path Path of the file to be open.
465+
* @param {string} scheme URI scheme that needs to support, optional
466+
*/
467+
presentOpenInMenu(path: string, scheme: string): void;
468+
469+
/**
470+
* Displays a full-screen preview of the target document using [UIDocumentInteractionController](https://developer.apple.com/reference/uikit/uidocumentinteractioncontroller).[presentPreview](https://developer.apple.com/documentation/uikit/uidocumentinteractioncontroller/1616828-presentpreview)
471+
* @param {string} path Path of the file to be open.
472+
* @param {string} scheme URI scheme that needs to support, optional
473+
*/
474+
presentPreview(path: string, scheme: string): void;
452475
}
453476

454477
export interface AndroidDownloadOption {
@@ -475,7 +498,7 @@ export interface AndroidDownloadOption {
475498
/**
476499
* Boolean value that determines if notification will be displayed.
477500
*/
478-
showNotification: boolean
501+
showNotification: boolean
479502
}
480503

481504
export interface AndroidApi {

0 commit comments

Comments
 (0)