-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
Bug Report
π Search Terms
export default, import default as, namespace, declaration.
π Version & Regression Information
This changed between versions 4.8.2 and 4.8.3.
β― Playground Link
I can't provide a link because both Bug Workbench and CodeSandbox still don't have 4.8.3.
π» Code
// @flatten-js/core/index.d.ts
declare namespace Flatten {
class Polygon {
constructor();
}
}
export default Flatten;// index.ts
import { default as Flatten } from '@flatten-js/core';
const x = new Flatten.Polygon();π Actual behavior
I get the following error:
error TS2339: Property 'Polygon' does not exist on type ...
When looking at Flatten, it still has a default within, so I need to access Polygon with Flatten.default.Polygon.
π Expected behavior
It gets unwrapped correctly, like in 4.8.2 and before. Right now I'm having to use the following workaround:
import { default as FlattenBad } from '@flatten-js/core';
const Flatten = FlattenBad as unknown as typeof FlattenBad.default;TheWashiba, dkulchenko, patricktree, liaoliaots, meteorlxy and 5 more
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug