在打字稿中,当我有一个动态导入时,例如:
getImport().then((result: any) => { // do stuff });
getImport 函数获取动态导入 Promise 的地方,例如
import(`../guideContent/Typescript/basics/introduction/introduction`)
我也知道所有这些动态导入都会返回相同的类型,例如
Interface Example {}
如何正确输入结果(例如任何类型)?
我尝试过 result: typeof ContentItems
和 result: ContentItems
,但是没有用