Import modules from all files in directory

Considering I have multiple ts files in a folder and all of them export the same type module. Can I import them like this? import * as things from "./things/";
2 Replies
ioB
ioB2y ago
This is not possible with this syntax. You could read the files in the directory and use dynamic imports to load them.
taiwannumberone
taiwannumberoneOP2y ago
Thanks, will do