What’s the return type of a dynamic import?
You need to use an import type and TypeScript 2.9 or higher. Here is an example: my_module.ts export const user = { name: “John”, age: 30 }; export const event = { name: “Birthday”, date: new Date(1989, 13, 2) }; demo.ts type ModuleType = typeof import(“./my_module”); // This is the import type! export function load(): … Read more