-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptHas ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosThis issue has compiler-backed repros: https://aka.ms/ts-reprosRecent RegressionThis is a new regression just found in the last major/minor version of TypeScript.This is a new regression just found in the last major/minor version of TypeScript.
Description
Our RWC is showing some breaking changes that look like a bug in decorator parsing.
⏯ Playground Link
// @strict: true
// @experimentalDecorators: true
// @filename: index.ts
declare var someDecorator: any;
export default class Whatever {
private _someField = () => {
return 0;
}
@someDecorator
getThing() {
return 0;
}
}
We used to parse this fine, but our RWC repo recently picked up that we started throwing a Decorators must precede the name and all keywords of property declarations.
on the decorator, which is incorrect. The issue does not occur when the arrow function on the prior line is terminated with a semicolon.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptHas ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosThis issue has compiler-backed repros: https://aka.ms/ts-reprosRecent RegressionThis is a new regression just found in the last major/minor version of TypeScript.This is a new regression just found in the last major/minor version of TypeScript.