UNPKG

press-next

Version:
34 lines (23 loc) 516 B
// #ifdef H5 import { getWebTIM } from './tim-web'; // #endif // #ifdef MP-WEIXIN import { getMpWxTIM } from './tim-mp-wx'; // #endif // #ifdef MP-QQ import TIM_MP from 'tim-wx-sdk'; // #endif import type { TimType } from '../types'; export async function getTIM(): Promise<TimType> { let result; // #ifdef H5 result = await getWebTIM(); // #endif // #ifdef MP-WEIXIN result = await getMpWxTIM(); // #endif // #ifdef MP-QQ result = Promise.resolve(TIM_MP); // #endif return result; }