import baseUtil from '../../../utils/base';
import modeManager from '../common/modeManager';

export default {
  /**
   * 平台定义的回溯方法
   */
  afterModlueTrack(moduleName, api) {
    // 检查原生 module
    const nativeMode = modeManager.getModule(moduleName) || {};
    const nativeAPI = nativeMode[api];
    return baseUtil.isFun(nativeAPI) ? nativeAPI.bind(nativeMode) : null;
  }
}