Javascript typescript中多个函数的动态导入
我的代码中有一个静态导入,如下所示Javascript typescript中多个函数的动态导入,javascript,typescript,import,dynamic-import,Javascript,Typescript,Import,Dynamic Import,我的代码中有一个静态导入,如下所示 import { findBotletByTelephonyNumber, fetchClientCustomSettings, fetchCallerStatus } from './../shared/custom-settings.service'; 如下所示 export const findBotletByTelephonyNumber = (x) => { //return something } 我在另一个函数中使用它们 现在我想切换到
import { findBotletByTelephonyNumber, fetchClientCustomSettings, fetchCallerStatus } from './../shared/custom-settings.service';
如下所示
export const findBotletByTelephonyNumber = (x) => { //return something }
我在另一个函数中使用它们
现在我想切换到动态导入
(Typescript),网络上的所有示例都是导入单个模块
我的问题是如何通过动态导入导入多个函数(一个接一个或全部导入)?我找到了答案,以防其他人也有同样的问题
const customSettingsModule = await import('./../shared/custom-settings.service');
customSettingsModule.findBotletByTelephonyNumber(6);