MOBILE-3947 core: Fix wrong types for chooser plugin

main
Dani Palou 2024-01-17 11:36:45 +01:00
parent 93d1c7bf51
commit aaa714cb64
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.
*/
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.
*/
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;
}
interface Cordova {
interface Window {
chooser: {
getFile(accept?: string): Promise<IChooserResult | undefined>;