Throw an error for a declare class field that have an initializer (#12093)
This commit is contained in:
@@ -2281,7 +2281,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
parseClassProperty(node: N.ClassProperty): N.ClassProperty {
|
||||
this.parseClassPropertyAnnotation(node);
|
||||
|
||||
if (node.declare && this.match(tt.equal)) {
|
||||
if (node.declare && this.match(tt.eq)) {
|
||||
this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user