Parse uninitialize const declaration in namespace in `.d.ts` file
ArnaudBarre opened this issue · comments
Arnaud Barré commented
I just discover this and I hate it. Personally I would love to see tools that don't support legacy things like enum and namespaces, but given that OXC already added support for TSModuleBlock
in the AST it's propbably better to follow allow this.
Maybe there are other differences, but in .d.ts, this is valid for TS
export namespace builders {
const breakParent: string;
}
Boshen commented
I can't reproduce this, the snippet parses correctly:
- in
.ts
it produces an correct AST with the error "Missing initializer in const declaration" - in
.d.ts
it produces a correct AST
Arnaud Barré commented
Oh yeah I completely mess up in my local setup and didn't correctly pass the file name to the parser. So I suppose what is missing is .d.ts
support in the playground: #2520