-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
Not sure if it's related to just a library file but I'm currently unable to use reserved words as property names. I have the following declare class:
declare class BabelNodeClassDeclaration extends BabelNode {
type: "ClassDeclaration";
id: BabelNodeIdentifier;
body: BabelNodeClassBody;
superClass?: void | BabelNodeExpression;
decorators: any;
typeParameters: any;
superTypeParameters: any;
implements: any;
}Note the implements property name. This causes the parser to fail with:
[LIB] types.js:365:3,12: Library parse error:
[LIB] types.js:365:3,12: Use of future reserved word in strict mode
However if I wrap implements in quotes like:
"implements": any;then I get a different error, this time not from the parser of:
[LIB] types.js:522:3,11: Library type error:
[LIB] types.js:522:3,11:
illegal name
Is there anyway around this? I'm unable to change the name of that property and need to annotate it.
Any help is appreciated, thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels