class Foo { constructor(@inject(dep) foo: string) {} }
prints
class Foo {
constructor(foo: string) {}
}
No parameter printer consults node.decorators. Decorators run user code, so this is a runtime behavior change, not formatting.
Context: found by a parse -> print -> reparse structural gate over a ~8.5k-file TS/JS corpus while adopting esrap in core-js's build plugin, then re-verified in isolation. esrap 2.3.5; the ASTs below come from @typescript-eslint/typescript-estree 8.67 with loc/range enabled, so the repros are independent of our own (oxc-based) pipeline.
prints
No parameter printer consults
node.decorators. Decorators run user code, so this is a runtime behavior change, not formatting.Context: found by a parse -> print -> reparse structural gate over a ~8.5k-file TS/JS corpus while adopting esrap in core-js's build plugin, then re-verified in isolation. esrap 2.3.5; the ASTs below come from
@typescript-eslint/typescript-estree8.67 withloc/rangeenabled, so the repros are independent of our own (oxc-based) pipeline.