Closed egasimus closed 4 months ago
export [type] * as Foobar from "./foo" parses to the following (simplified). Trying to print it back into code adds an extra pair of curly braces.
export [type] * as Foobar from "./foo"
import recast from 'recast' for (const exportKind of ["value", "type"]) { console.log(recast.print({ type: 'ExportNamedDeclaration', exportKind, specifiers: [ { type: 'ExportNamespaceSpecifier', exported: { type: 'Identifier', name: 'Foobar' } } ], source: { type: 'StringLiteral', value: './foo', } }).code) }
Expected:
export * as Foobar from "./foo"; export type * as Foobar from "./foo";
Actual:
export { * as Foobar } from "./foo"; export type { * as Foobar } from "./foo";
Context:
I'm trying to modify some .d.mts files, and TS balks at the extra curly braces.
.d.mts
Fixed in v0.23.6.
export [type] * as Foobar from "./foo"
parses to the following (simplified). Trying to print it back into code adds an extra pair of curly braces.Expected:
Actual:
Context:
I'm trying to modify some
.d.mts
files, and TS balks at the extra curly braces.