Closed ikatyang closed 6 years ago
Context: prettier/prettier#4552
What version of TypeScript are you using? 2.9.0-rc
What version of typescript-eslint-parser are you using? 2960b002746c01fb9cb15bb5f4c1e7e925c6519a (typescript-eslint-parser#ts-2.9)
typescript-eslint-parser
What code were you trying to parse?
@decorator() interface X {}
What did you expect to happen?
{ "type": "TSInterfaceDeclaration", "abstract": false, "body": { "type": "TSInterfaceBody", "body": [] }, "decorators": [ { "type": "Decorator", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "decorator" }, "arguments": [] } } ], "id": { "type": "Identifier", "name": "X" }, "heritage": [] }
What happened?
{ "type": "TSInterfaceDeclaration", "abstract": false, "body": { "type": "TSInterfaceBody", "body": [] }, - "decorators": [ - { - "type": "Decorator", - "expression": { - "type": "CallExpression", - "callee": { - "type": "Identifier", - "name": "decorator" - }, - "arguments": [] - } - } - ], "id": { "type": "Identifier", "name": "X" }, "heritage": [] }
For reference, here’s an ASTExplorer page with that code snippet as parsed by TypeScript.
Context: prettier/prettier#4552
What version of TypeScript are you using? 2.9.0-rc
What version of
typescript-eslint-parser
are you using? 2960b002746c01fb9cb15bb5f4c1e7e925c6519a (typescript-eslint-parser#ts-2.9)What code were you trying to parse?
What did you expect to happen?
What happened?