Merge pull request #3894 from dpalou/MOBILE-3947

MOBILE-3947 core: Fix wrong types for chooser plugin
main
Noel De Martin 2024-01-17 12:32:54 +01:00 committed by GitHub
commit 9632d5ad50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ export class Chooser {
* If error occurs, promise will be rejected. * If error occurs, promise will be rejected.
*/ */
getFile(accept?: string): Promise<IChooserResult | undefined> { getFile(accept?: string): Promise<IChooserResult | undefined> {
return cordova.chooser.getFile(accept); return window.chooser.getFile(accept);
} }
/** /**
@ -41,7 +41,7 @@ export class Chooser {
* If error occurs, promise will be rejected. * If error occurs, promise will be rejected.
*/ */
getFileMetadata(accept?: string): Promise<IChooserResult | undefined> { getFileMetadata(accept?: string): Promise<IChooserResult | undefined> {
return cordova.chooser.getFileMetadata(accept); return window.chooser.getFileMetadata(accept);
} }
} }

View File

@ -26,7 +26,7 @@ interface IChooserResult {
uri: string; uri: string;
} }
interface Cordova { interface Window {
chooser: { chooser: {
getFile(accept?: string): Promise<IChooserResult | undefined>; getFile(accept?: string): Promise<IChooserResult | undefined>;