Merge pull request #3894 from dpalou/MOBILE-3947
MOBILE-3947 core: Fix wrong types for chooser plugin
This commit is contained in:
commit
9632d5ad50
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
2
src/types/cordova-plugin-chooser.d.ts
vendored
2
src/types/cordova-plugin-chooser.d.ts
vendored
@ -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>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user