import type { TimType } from '../types';


export function getMpWxTIM(): Promise<TimType>  {
  return new Promise((resolve, reject) => {
    // 硬编码，业务必须通过相应插件，将 tim-wx-sdk/tim-wx.js
    // 拷贝到下面的位置！
    // @ts-ignore
    require.async('../views/tim-wx/tim-wx.js')
      .then((res: TimType) => {
        resolve(res);
      })
      .catch((err: any) => {
        console.warn('[getMpWxTIM] err', err);
        reject(err);
      });
  });
}
