WeWork.tsx 417 Bytes
Newer Older
silver47gin's avatar
silver47gin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import { NativeModules } from "react-native";

const { WWNativeModule } = NativeModules;

interface WeWorkInterface {
  /**
   * 初始化
   */
  init: (schema: string) => void;
  /**
   * 登录
   */
  login: (appId: string, agentId: string, schema: string) => Promise<string>;
  /**
   * 获取常量
   */
  getConstants: () => Record<string, string>;
}

export const WeWork = WWNativeModule as WeWorkInterface;