1771771771
Denoβ€’4y ago
177177177

type a whole directory to make sure each file in the directory exports a default module of a type.

Can you type a whole directory
to make sure that every file in the directory is exporting a default module of a certain type

im making a library, and it reads a directory named commands in the users current working directory, each file in the commands directory should export a default object of type Command

currently my library checks if the file is exporting a default module before going further,
but i was wondering if typescript could do that
since its about exporting the correct type
Was this page helpful?