TypeScript / JavaScript – import all types

With ES6 modules, the closest thing available to what you want is a namespace import:

import * as foo from './otherClass';

The use it individual exports as

foo.ClassA

You can see the available kinds of imports in the import documentation.

Also, what’s the meaning of the { … } and some of the types being outside and some inside?

That’s for importing named exports. You can read about that in the documentation I referenced or in my answer here.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)