You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preserve decorator ordering, remove restrictions on decorator-before-export in JavaScript files #52578
As per conclusions we arrived at in the January 2023 meeting
we should allow decorators before and after export/export default, but not around both.
our down-level emit and printing should preserve the ordering of where decorators are placed.
declarefunctiondecorator(...args: any[]): any;// ✅ Works!
@decoratorexportclassFoo{}// ✅ Works!export @decoratorclassBar{}// ❌ You have to pick *one or the other*.
@decoratorexport @decoratorclassBaz{}
declarefunctiondecorator(...args: any[]): any;// ✅ Works!
@decoratorexportdefaultclassFoo{}// ✅ Works!exportdefault @decoratorclassdefaultBar{}// ❌ Not in between.export @decoratordefaultclassBaz{}// ❌ Not around both.
@decoratorexportdefault @decoratorclassBiz{}// ❌ DEFINITELY not interleaved.
@decoratorexport @decoratordefault @decoratorclassWat{}
changed the title [-]Remove restrictions on decorator-before-export in JavaScript files[/-][+]Preserve decorator ordering, remove restrictions on decorator-before-export in JavaScript files[/+]on Feb 2, 2023
Activity
[-]Remove restrictions on decorator-before-export in JavaScript files[/-][+]Preserve decorator ordering, remove restrictions on decorator-before-export in JavaScript files[/+]