declare module "foo"{functionfoo(): void;export=foo;}Can't be included via import * as f from "foo";.
(test.ts(1,20): error TS2497: Module '"foo"' resolves to a non-module entity and cannot be imported using this construct.)
Whereas
declare module "foo"{functionfoo(): void;namespacefoo{}export=foo;}Can be. The distinction seems artificial.
Can't be included via
import * as f from "foo";.(
test.ts(1,20): error TS2497: Module '"foo"' resolves to a non-module entity and cannot be imported using this construct.)Whereas
Can be. The distinction seems artificial.