I have a namespace set up like this:
export namespace Entities {
export class Car { }
export class Motorbike { }
}
In another class, I then import Car
and Motorbike
. However, I am unable to import them succinctly. If I try to import them like this:
import { Entities.Car as Car, Entities.Motorbike as Motorbike } from "./somefile.ts";
I get this error (on the .
after Entities
):
',' expected.
I am able to do this:
// import whole namespace
import { Entities } from "./somefile.ts";
// use the type directly:
let vehicle: Entities.Car;
However ideally I would be able to import them without manually importing the namespace. Is this possible?