declare enum PlatformType { Android = 0, IOS = 1, PC = 2, Browser = 3 } export declare enum LzcUserAgent { AndroidWebShell = "Lazycat_101", DesktopWebShell = "LazyCatClientDesktop", IOSWebShell = "Lazycat_103", ControlView = "Lazycat_ControlView", ContentView = "Lazycat_ContentView" } declare global { interface Window { ipcRenderer: any; } } /** * @description: 指定函数支持平台函数装饰器 * @param {array} platforms * @return {Function} */ declare function native(...platforms: PlatformType[]): (...args: any[]) => any; declare class LzcAppSdk { private static instance; private static cacheJSBridgeIOS; protected constructor(); /** * @description: 获取 LzcAppSdk 对象实例 * @return {LzcAppSdk} */ static getInstance(): LzcAppSdk; /** * @description: 初始化 JSBridge 全局回调队列 * @return {void} */ private initCallbackQueue; /** * @description: JS 调用原生函数时,添加回调方法到回调方法存储器,并返回索引ID * @param {Function} responseCallBackFunc * @return {string} */ static addToCallBackFuncDictWith(responseCallBackFunc: (...args: any[]) => any): string; /** * @description: 原生接受 JS 调用并处理相关操作后,发送回调给js, js 根据索引ID寻找回调方法来处理数据,然后移除js的回调方法 * @param {string} funcUniqueID * @param {any} responseData * @return {void} */ static sendCallBackFunc(funcUniqueID: string, responseData: any): void; /** * @description: 注册一个 JS 函数 * @param {string} name * @return {Promise | undefined} */ private static _registerCallBackFunc; /** * @description: 获取 IOS 原生 JSBridge 对象 * @return {Promise} */ private static initJSBridgeIOS; /** * @description: 根据原生注入命名空间 异步获取 JSBridge * @param {any} namespaces * @return {Promise} */ useNativeAsync(namespaces?: any): Promise; /** * @description: 根据原生注入命名空间 同步获取 JSBridge (如调用原生方法不需要回调值的可以使用该函数获取原生对象否则最好使用 useNativeAsync 函数) * @param {any} namespaces * @return {any} */ useNative(namespaces?: any): any; /** * @deprecated * @description: 判断是否属于 webshell 环境 * @return {boolean} */ isWebShell(): boolean; /** * @description: 处于任意一个客户端的webview内 */ isClientWebShell(): boolean; /** * @description: 是否是android webshell 环境 * @return {boolean} */ isAndroidWebShell(): boolean; /** * @description: 是否是pc webshell 环境 * @return {boolean} */ isPCWebShell(): boolean; /** * @description: 是否是ios webshell 环境 * @return {boolean} */ isIosWebShell(): boolean; /** * @description: 是否属于 Control webshell 环境 * @return {boolean} */ isControlView(): boolean; /** * @description: 是否属于 Content webshell 环境 * @return {boolean} */ isContentView(): boolean; /** * @deprecated * @description: 是否在客户端内 * @return {boolean} */ isInApplication(): boolean; } declare class LzcAppSdkManage { protected static LzcApp: LzcAppSdk; protected LzcApp: LzcAppSdk; } declare const LzcApp: LzcAppSdk; /** * @description: 兼容旧的 android 注入的 js 调用(待迁移后删除改引用) * @deprecated: 该 JS 注入引用即将弃用,请尽快适配最新的 LzcAppSdk.useNative() 调用方式 * @return {any} */ declare const LzcClient: any; export default LzcApp; export { PlatformType as LzcAppPlatformType, LzcAppSdkManage, LzcClient, native };