@hylid/types
Advanced tools
Comparing version 4.0.0-alpha.6 to 4.0.0-alpha.7
@@ -25,2 +25,7 @@ /// <reference types="miniprogram" /> | ||
} | ||
export interface AsyncCallback<T = any> { | ||
success?: ((res: T) => void) | undefined; | ||
fail?: ((err: AsyncCallbackFailObject) => void) | undefined; | ||
complete?: ((res?: any) => any) | undefined; | ||
} | ||
export interface MPApi extends Omit<MiniprogramApi, 'request'> { | ||
@@ -112,3 +117,6 @@ authorize: (opt: any) => void; | ||
url: string; | ||
} & AsyncCallback<void>) => void; | ||
} & AsyncCallback<{ | ||
succeed: boolean; | ||
channelName: string; | ||
}>) => void; | ||
homeAddAppToMyApps: (args: { | ||
@@ -128,4 +136,4 @@ appId: string; | ||
keep?: boolean; | ||
callback: (res: any) => void; | ||
} & AsyncCallback<void>) => void; | ||
callback?: (res: any) => void; | ||
} & AsyncCallback<any>) => void; | ||
postNotification: (args: { | ||
@@ -132,0 +140,0 @@ name: string; |
{ | ||
"name": "@hylid/types", | ||
"version": "4.0.0-alpha.6", | ||
"version": "4.0.0-alpha.7", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
19255
573