I've organized my files like this:
index.ts
folder/
a.ts
b.ts
subfolder/
c.ts
d.ts
e.ts
...
In each file, there is one default exported class and I want index.ts to export all these classes as an array. Currently, I achieve this using the following method:
import a from "./folder/a";
import b from "./folder/b";
import c from "./folder/subfolder/c";
import d from "./folder/subfolder/d";
import e from "./folder/subfolder/e";
...
export const things = [a, b, c, d, e, ...];
However, when dealing with a large number of files, this approach becomes unwieldy and inefficient in terms of lines of code. Is there a more efficient way to accomplish this?