@hylid/types
Advanced tools
Comparing version 3.3.0-alpha.0 to 3.3.0-alpha.1
@@ -10,3 +10,3 @@ /// <reference types="miniprogram" /> | ||
operationType: string; | ||
requestData: any[]; | ||
requestData: string | unknown[]; | ||
headers?: Record<string, any>; | ||
@@ -19,2 +19,9 @@ gateway?: string; | ||
} | ||
export interface getCurrentPagesOptions { | ||
payload?: Record<string, any>; | ||
success: (res: { | ||
route: string; | ||
}[]) => void; | ||
fail: (err: any) => void; | ||
} | ||
export interface MPApi extends MiniprogramApi { | ||
@@ -38,3 +45,6 @@ authorize: (opt: any) => void; | ||
paySignCenter(args?: any): void; | ||
rpc(args: IRPCArgs, callback: (result: any) => void): void; | ||
rpc(args: IRPCArgs & AsyncCallback<{ | ||
headers: Record<string, string>; | ||
resData: object; | ||
}>): void; | ||
APRegionRPC(args?: any): void; | ||
@@ -59,2 +69,26 @@ startApp(args?: any): void; | ||
hideOptionButton(args?: any): void; | ||
getCurrentLanguage(): string; | ||
openURL(args?: Common): Promise<void>; | ||
getAppId(args: AsyncCallback<{ | ||
appId: string; | ||
}>): void; | ||
getCurrentPages(args: getCurrentPagesOptions): void; | ||
getSDKVersion(args: AsyncCallback<string>): void; | ||
createWithoutAuthRpc: (args: { | ||
appId?: string; | ||
workspaceId?: string; | ||
defaultGateway: string; | ||
defaultHeaders?: Record<string, string>; | ||
request: (args: RequestArgs) => void; | ||
}) => PickMPAttr<'rpc'>; | ||
rpcWithAuth: PickMPAttr<'rpc'>; | ||
rpcWithAuthAPlus: PickMPAttr<'rpc'>; | ||
defineRuntimeConfig: { | ||
(args: Record<string, any>): void; | ||
getRuntimeConfig?: () => Record<string, any>; | ||
}; | ||
getAuthCode: (args: { | ||
scopes: string | string[]; | ||
appId?: string; | ||
} & AsyncCallback<GetAuthCodeCallbackValue>) => void; | ||
} | ||
@@ -64,1 +98,3 @@ export declare type PickMPAttr<Attr extends keyof MPApi> = PickAttr<Attr, MPApi>; | ||
export declare type PickMpReturns<Attr extends keyof MPApi> = ReturnType<PickMPAttr<Attr>>; | ||
export declare type ReturnTypePromise<T> = T extends AsyncCallback<infer S> ? (args?: Omit<T, "success" | "fail" | "complete"> | undefined) => Promise<S> : never; | ||
export declare type PickPromiseAttr<T> = T extends (args: infer S) => void ? ReturnTypePromise<S> : never; |
{ | ||
"name": "@hylid/types", | ||
"version": "3.3.0-alpha.0", | ||
"version": "3.3.0-alpha.1", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14850
410
1