I have problem finding the type of an imported module in typescript, could someone help me?
To clarify my question I have a module module.ts
export class RSL1 {};
Then I load it in my index.ts
with
const script = await import('module.js');
It loads correctly and in a browser in debug console it is printed out as Module {Symbol(Symbol.toStringTag): "Module"}
But what is the typescript type of the script
variable? The Module
class is not known to the compiler.
I need just the generic abstract type of the module, not the "runtime" instance. I guess the members of the module depend on what is actually exported in the module. But I don't need that.