mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
fix(in-app-purchase-2): fix typings for refresh (#3632)
Fixes the typings for the return value of `refresh` as described [here](https://github.com/j3k0/cordova-plugin-purchase/blob/dd6bf6f/doc/api.md#return-value-3)
This commit is contained in:
parent
158bf637cd
commit
8dcb6be4ea
@ -7,6 +7,13 @@ export interface IAPProductOptions {
|
|||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IRefeshResult {
|
||||||
|
cancelled(fn: () => void): void;
|
||||||
|
failed(fn: () => void): void;
|
||||||
|
completed(fn: () => void): void;
|
||||||
|
finished(fn: () => void): void;
|
||||||
|
}
|
||||||
|
|
||||||
export type IAPProducts = IAPProduct[] & {
|
export type IAPProducts = IAPProduct[] & {
|
||||||
/**
|
/**
|
||||||
* Get product by ID
|
* Get product by ID
|
||||||
@ -865,7 +872,9 @@ export class InAppPurchase2 extends IonicNativePlugin {
|
|||||||
* and in the callback `product.finish()` should be called.
|
* and in the callback `product.finish()` should be called.
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
refresh(): void {}
|
refresh(): IRefeshResult {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/** Lightweight method like refresh but do not relogin user */
|
/** Lightweight method like refresh but do not relogin user */
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
|
Loading…
Reference in New Issue
Block a user