Declare type to be an import depending on a string literal argument: typeof import(name); #41382
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
Hello,
It's seems to be difficult to do but there's now a lot of possibilities with the typescript compiler that I wouldn't have thought possible before, so I prefer to ask.
Is there a chance to have this kind of definition:
I mean declaring the return type as the type coming from the import of module "name". So we could have the type returned by require:
I guess if it's feasible, it will also be possible to add more typing on this kind of javascript code
like this
Thanks for your help,
--
Laurent
The text was updated successfully, but these errors were encountered: