In Typescript, I can write
let mod = await import("redis");
and get auto-completion for all modules when entering a value for the import. Is this a special case, or can I get the same behavior using a type on a function that I define, like
let my_import = (module: ???) => import(module)
or is there another way to get module name auto-completion?
Yes, this is a special case.
import()is not a function call, andimportis not a function - it is specific syntax.