I am running a react application. The code below does not work because of the following error message:
import =is not supported by @babel/plugin-transform-typescript Please consider usingimport <moduleName> from '<moduleName>';alongside Typescript's --allowSyntheticDefaultImports option.
apiTypes.d.ts
declare module ModuleA {
declare module ModuleB {
export interface ModuleABInterface {
}
}
}
token.ts
import ModuleABInterface = ModuleA.ModuleB.ModuleABInterface
let test: ModuleABInterface
What would be the correct solution to import from nested modules?
type ModuleABInterface = ModuleA.ModuleB.ModuleABInterface; let test: ModuleABInterfacefor that.