Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hylid/types

Package Overview
Dependencies
Maintainers
0
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hylid/types - npm Package Compare versions

Comparing version 3.3.0-alpha.0 to 3.3.0-alpha.1

40

lib/mp.d.ts

@@ -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;

2

package.json
{
"name": "@hylid/types",
"version": "3.3.0-alpha.0",
"version": "3.3.0-alpha.1",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc