Closed alecmev closed 10 months ago
Please see this issue: https://github.com/microsoft/TypeScript/issues/50690 As suggested by TypeScript team, the typings should be done like so instead:
declare class Polygon { constructor(); } declare const Flatten: { Polygon: Polygon; } export { Polygon }; export { Flatten as default };
On a related note, it was also mentioned there that ESM isn't declared in a standard way in package.json. I recently fixed dxf-parser's ESM, you can take a look here: https://github.com/gdsestimating/dxf-parser/pull/86
package.json
dxf-parser
ESM entry point issue fixed in v1.4.5, export typing fixed in one of the previous versions
Please see this issue: https://github.com/microsoft/TypeScript/issues/50690 As suggested by TypeScript team, the typings should be done like so instead:
On a related note, it was also mentioned there that ESM isn't declared in a standard way in
package.json
. I recently fixeddxf-parser
's ESM, you can take a look here: https://github.com/gdsestimating/dxf-parser/pull/86