mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
chore(): remove returned Promises
Addresses: https://github.com/driftyco/ionic-native/issues/38.
This commit is contained in:
@@ -59,26 +59,12 @@ export class ActionSheet {
|
||||
addCancelButtonWithLabel?: string,
|
||||
addDestructiveButtonWithLabel?: string,
|
||||
position?: number[]
|
||||
}) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
}): Promise<any> { return }
|
||||
|
||||
|
||||
/**
|
||||
* Hide the ActionSheet.
|
||||
*/
|
||||
@Cordova()
|
||||
static hide() {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
static hide(): Promise<any> { return }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user