export interface WxResponse { errCode: string; errMsg: string; } export interface WxConfigProps { debug: boolean; appId: string; timestamp: number; nonceStr: string; signature: string; jsApiList: string[]; } export interface WxGetLocationSuccessResponse extends WxResponse { latitude: string; longitude: string; speed: string; accuracy: string; } interface WxMiniProgramRedirectToProps { url: string; sucess?: () => void; fail?: () => void; complete?: () => void; } interface WxGetLocationProps { type: "wgs84" | "gcj02"; success: (response: WxGetLocationSuccessResponse) => void; fail?: (response: WxResponse) => void; complete?: (response: WxResponse) => void; isHighAccuracy: boolean; highAccuracyExpireTime: number; } export interface Wx { ready: (callback: () => void) => void; error: (callback: (response: WxResponse) => void) => void; config: (props: WxConfigProps) => void; getLocation: (props: WxGetLocationProps) => void; miniProgram: { redirectTo: (props: WxMiniProgramRedirectToProps) => void; getEnv: () => { miniprogram: boolean; }; }; } export {};