In TypeScript handbook few techniques for importing modules are described:
- Import a single export from a module:
import { ZipCodeValidator } from "./ZipCodeValidator"; - Import a single export from a module and rename it:
import { ZipCodeValidator as ZCV } from "./ZipCodeValidator"; - Import entire module:
import * as validator from "./ZipCodeValidator";
I expect there's one more option but nowhere I can find it. Is it possible to import all modules from a given directory?
I guess the syntax should be more or less like this: import * from "./Converters".