diff --git a/.gitignore b/.gitignore index 5f01791..34a9c5a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ _test.js .vscode yarn.lock .eslint-release-info.json +.idea diff --git a/README.md b/README.md index f2c4442..97b92d1 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ The following additional configuration options are available by specifying them We will always endeavor to support the latest stable version of TypeScript. -The version of TypeScript currently supported by this parser is `~3.1.1`. This is reflected in the `devDependency` requirement within the package.json file, and it is what the tests will be run against. We have an open `peerDependency` requirement in order to allow for experimentation on newer/beta versions of TypeScript. +The version of TypeScript currently supported by this parser is `~3.2.1`. This is reflected in the `devDependency` requirement within the package.json file, and it is what the tests will be run against. We have an open `peerDependency` requirement in order to allow for experimentation on newer/beta versions of TypeScript. If you use a non-supported version of TypeScript, the parser will log a warning to the console. diff --git a/analyze-scope.js b/analyze-scope.js index a542a22..13c559b 100644 --- a/analyze-scope.js +++ b/analyze-scope.js @@ -239,25 +239,6 @@ class Referencer extends OriginalReferencer { super.MethodDefinition(node); } - /** - * Override. - * Don't make variable if `kind === "type"`. - * It doesn't declare variables but declare types. - * @param {VariableDeclaration} node The VariableDeclaration node to visit. - * @returns {void} - */ - VariableDeclaration(node) { - if (node.kind !== "type") { - super.VariableDeclaration(node); - return; - } - - // To detect typeof. - this.typeMode = true; - this.visitChildren(node); - this.typeMode = false; - } - /** * Don't create the reference object for the key if not computed. * @param {TSEmptyBodyFunctionDeclaration} node The TSEmptyBodyFunctionDeclaration node to visit. @@ -337,6 +318,7 @@ class Referencer extends OriginalReferencer { this.visit(returnType); this.typeMode = upperTypeMode; } + TSEmptyBodyDeclareFunction(node) { this.TSEmptyBodyFunctionDeclaration(node); } @@ -556,6 +538,12 @@ class Referencer extends OriginalReferencer { this.visit(body); } + TSTypeAliasDeclaration(node) { + this.typeMode = true; + this.visitChildren(node); + this.typeMode = false; + } + /** * Process the module block. * @param {TSModuleBlock} node The TSModuleBlock node to visit. diff --git a/package.json b/package.json index fc21e87..c16077a 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "dependencies": { "eslint-scope": "^4.0.0", "eslint-visitor-keys": "^1.0.0", - "typescript-estree": "5.3.0" + "typescript-estree": "^7.0.0" }, "devDependencies": { "eslint": "^4.19.1", @@ -57,7 +57,7 @@ "npm-license": "0.3.3", "shelljs": "0.8.2", "shelljs-nodecli": "0.1.1", - "typescript": "~3.1.1" + "typescript": "~3.2.1" }, "jest": { "testEnvironment": "node", diff --git a/parser.js b/parser.js index 59f5836..e59361c 100644 --- a/parser.js +++ b/parser.js @@ -42,9 +42,9 @@ exports.parseForESLint = function parseForESLint(code, options) { enter: node => { switch (node.type) { // Just for backward compatibility. - case "DeclareFunction": + case "TSDeclareFunction": if (!node.body) { - node.type = `TSEmptyBody${node.type}`; + node.type = "TSEmptyBodyDeclareFunction"; } break; diff --git a/tests/fixtures/ecma-features/bigIntLiterals/binary.src.js b/tests/fixtures/ecma-features/bigIntLiterals/binary.src.js new file mode 100644 index 0000000..2b13801 --- /dev/null +++ b/tests/fixtures/ecma-features/bigIntLiterals/binary.src.js @@ -0,0 +1 @@ +0b1n; diff --git a/tests/fixtures/ecma-features/bigIntLiterals/decimal.src.js b/tests/fixtures/ecma-features/bigIntLiterals/decimal.src.js new file mode 100644 index 0000000..fe03424 --- /dev/null +++ b/tests/fixtures/ecma-features/bigIntLiterals/decimal.src.js @@ -0,0 +1 @@ +1n; diff --git a/tests/fixtures/ecma-features/bigIntLiterals/hex.src.js b/tests/fixtures/ecma-features/bigIntLiterals/hex.src.js new file mode 100644 index 0000000..204f239 --- /dev/null +++ b/tests/fixtures/ecma-features/bigIntLiterals/hex.src.js @@ -0,0 +1 @@ +0x1n; diff --git a/tests/fixtures/ecma-features/bigIntLiterals/octal.src.js b/tests/fixtures/ecma-features/bigIntLiterals/octal.src.js new file mode 100644 index 0000000..f2ce84f --- /dev/null +++ b/tests/fixtures/ecma-features/bigIntLiterals/octal.src.js @@ -0,0 +1 @@ +0o1n; diff --git a/tests/fixtures/scope-analysis/type-alias.ts b/tests/fixtures/scope-analysis/type-alias.ts new file mode 100644 index 0000000..188a66b --- /dev/null +++ b/tests/fixtures/scope-analysis/type-alias.ts @@ -0,0 +1 @@ +type foo = string diff --git a/tests/integration/declared-empty-body-functions-issue-162/package.json b/tests/integration/declared-empty-body-functions-issue-162/package.json index 9029571..4944126 100644 --- a/tests/integration/declared-empty-body-functions-issue-162/package.json +++ b/tests/integration/declared-empty-body-functions-issue-162/package.json @@ -8,6 +8,6 @@ "devDependencies": { "eslint": "4.19.1", "jest": "23.1.0", - "typescript": "~3.1.1" + "typescript": "~3.2.1" } -} \ No newline at end of file +} diff --git a/tests/integration/jsdoc-indent-issues-344-422/package.json b/tests/integration/jsdoc-indent-issues-344-422/package.json index 9029571..4944126 100644 --- a/tests/integration/jsdoc-indent-issues-344-422/package.json +++ b/tests/integration/jsdoc-indent-issues-344-422/package.json @@ -8,6 +8,6 @@ "devDependencies": { "eslint": "4.19.1", "jest": "23.1.0", - "typescript": "~3.1.1" + "typescript": "~3.2.1" } -} \ No newline at end of file +} diff --git a/tests/integration/method-overloads-issue-389/package.json b/tests/integration/method-overloads-issue-389/package.json index 9029571..4944126 100644 --- a/tests/integration/method-overloads-issue-389/package.json +++ b/tests/integration/method-overloads-issue-389/package.json @@ -8,6 +8,6 @@ "devDependencies": { "eslint": "4.19.1", "jest": "23.1.0", - "typescript": "~3.1.1" + "typescript": "~3.2.1" } -} \ No newline at end of file +} diff --git a/tests/integration/no-redeclare-overloaded-functions-issue-402/package.json b/tests/integration/no-redeclare-overloaded-functions-issue-402/package.json index 9029571..4944126 100644 --- a/tests/integration/no-redeclare-overloaded-functions-issue-402/package.json +++ b/tests/integration/no-redeclare-overloaded-functions-issue-402/package.json @@ -8,6 +8,6 @@ "devDependencies": { "eslint": "4.19.1", "jest": "23.1.0", - "typescript": "~3.1.1" + "typescript": "~3.2.1" } -} \ No newline at end of file +} diff --git a/tests/integration/range-error-indent-issue-333/package.json b/tests/integration/range-error-indent-issue-333/package.json index 9029571..4944126 100644 --- a/tests/integration/range-error-indent-issue-333/package.json +++ b/tests/integration/range-error-indent-issue-333/package.json @@ -8,6 +8,6 @@ "devDependencies": { "eslint": "4.19.1", "jest": "23.1.0", - "typescript": "~3.1.1" + "typescript": "~3.2.1" } -} \ No newline at end of file +} diff --git a/tests/lib/__snapshots__/ecma-features.js.snap b/tests/lib/__snapshots__/ecma-features.js.snap index 00a985d..ee9c97b 100644 --- a/tests/lib/__snapshots__/ecma-features.js.snap +++ b/tests/lib/__snapshots__/ecma-features.js.snap @@ -9142,6 +9142,398 @@ Object { } `; +exports[`ecmaFeatures fixtures/bigIntLiterals/binary.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "raw": "0b1n", + "type": "BigIntLiteral", + "value": "0b1", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "0b1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`ecmaFeatures fixtures/bigIntLiterals/decimal.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "raw": "1n", + "type": "BigIntLiteral", + "value": "1", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "type": "Identifier", + "value": "1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`ecmaFeatures fixtures/bigIntLiterals/hex.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "raw": "0x1n", + "type": "BigIntLiteral", + "value": "0x1", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "0x1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`ecmaFeatures fixtures/bigIntLiterals/octal.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "raw": "0o1n", + "type": "BigIntLiteral", + "value": "0o1", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "ExpressionStatement", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "0o1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + exports[`ecmaFeatures fixtures/binaryLiterals/invalid.src 1`] = `"';' expected."`; exports[`ecmaFeatures fixtures/binaryLiterals/lowercase.src 1`] = ` @@ -101637,7 +102029,6 @@ Object { "body": Array [ Object { "async": false, - "body": null, "expression": false, "generator": false, "id": Object { @@ -101955,7 +102346,6 @@ Object { "body": Array [ Object { "async": false, - "body": null, "expression": false, "generator": false, "id": Object { diff --git a/tests/lib/__snapshots__/scope-analysis.js.snap b/tests/lib/__snapshots__/scope-analysis.js.snap index 6316b14..8a68450 100644 --- a/tests/lib/__snapshots__/scope-analysis.js.snap +++ b/tests/lib/__snapshots__/scope-analysis.js.snap @@ -5298,6 +5298,31 @@ Object { } `; +exports[`TypeScript scope analysis tests/fixtures/scope-analysis/type-alias.ts 1`] = ` +Object { + "$id": 0, + "block": Object { + "range": Array [ + 0, + 18, + ], + "type": "Program", + }, + "childScopes": Array [], + "functionExpressionScope": false, + "isStrict": false, + "references": Array [], + "throughReferences": Array [], + "type": "global", + "upperScope": null, + "variableMap": Object {}, + "variableScope": Object { + "$ref": 0, + }, + "variables": Array [], +} +`; + exports[`TypeScript scope analysis tests/fixtures/scope-analysis/type-annotations.ts 1`] = ` Object { "$id": 7, diff --git a/tests/lib/__snapshots__/tsx.js.snap b/tests/lib/__snapshots__/tsx.js.snap index 4025e7b..2c696e0 100644 --- a/tests/lib/__snapshots__/tsx.js.snap +++ b/tests/lib/__snapshots__/tsx.js.snap @@ -500,148 +500,128 @@ Object { "type": "ImportDeclaration", }, Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "Props", + "range": Array [ + 36, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 31, + 63, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, }, + "name": "title", + "range": Array [ + 48, + 53, + ], + "type": "Identifier", }, - "name": "Props", - "range": Array [ - 36, - 41, - ], - "type": "Identifier", - }, - "init": Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 3, }, "start": Object { - "column": 13, - "line": 2, + "column": 2, + "line": 3, }, }, - "members": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "title", - "range": Array [ - 48, - 53, - ], - "type": "Identifier", + "range": Array [ + 48, + 61, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "range": Array [ + 53, + 61, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { "column": 15, "line": 3, }, "start": Object { - "column": 2, + "column": 9, "line": 3, }, }, "range": Array [ - 48, + 55, 61, ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 53, - 61, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "TSStringKeyword", - }, - }, + "type": "TSStringKeyword", }, - ], - "range": Array [ - 44, - 63, - ], - "type": "TSTypeLiteral", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 2, }, }, - "range": Array [ - 36, - 63, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 2, - }, + ], + "range": Array [ + 44, + 63, + ], + "type": "TSTypeLiteral", }, - "range": Array [ - 31, - 63, - ], - "type": "VariableDeclaration", }, Object { "declaration": Object { diff --git a/tests/lib/__snapshots__/typescript.js.snap b/tests/lib/__snapshots__/typescript.js.snap index dc29543..5703c0c 100644 --- a/tests/lib/__snapshots__/typescript.js.snap +++ b/tests/lib/__snapshots__/typescript.js.snap @@ -10741,7 +10741,6 @@ Object { "type": "ClassDeclaration", }, Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -10796,254 +10795,234 @@ Object { "type": "TSInterfaceDeclaration", }, Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "name": "Constructor", - "range": Array [ - 163, - 174, - ], - "type": "Identifier", + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 9, }, - "init": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 22, - "line": 9, - }, - }, - "parameters": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 30, - "line": 9, - }, - }, - "name": "args", - "range": Array [ - 188, - 199, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 34, - "line": 9, - }, - }, - "range": Array [ - 192, - 199, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 9, - }, - "start": Object { - "column": 36, - "line": 9, - }, - }, - "range": Array [ - 194, - 197, - ], - "type": "TSAnyKeyword", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 36, - "line": 9, - }, - }, - "range": Array [ - 194, - 199, - ], - "type": "TSArrayType", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 27, - "line": 9, - }, - }, - "range": Array [ - 185, - 199, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 180, - 205, - ], - "type": "TSConstructorType", - "typeAnnotation": Object { + "start": Object { + "column": 5, + "line": 9, + }, + }, + "name": "Constructor", + "range": Array [ + 163, + 174, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 48, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 9, + }, + }, + "range": Array [ + 158, + 206, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 22, + "line": 9, + }, + }, + "parameters": Array [ + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 47, + "column": 41, "line": 9, }, "start": Object { - "column": 44, + "column": 30, "line": 9, }, }, + "name": "args", "range": Array [ - 202, - 205, + 188, + 199, ], - "type": "TSTypeAnnotation", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 47, + "column": 41, "line": 9, }, "start": Object { - "column": 46, + "column": 34, "line": 9, }, }, "range": Array [ - 204, - 205, + 192, + 199, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 9, + }, + "start": Object { + "column": 36, + "line": 9, + }, + }, + "range": Array [ + 194, + 197, + ], + "type": "TSAnyKeyword", + }, "loc": Object { "end": Object { - "column": 47, + "column": 41, "line": 9, }, "start": Object { - "column": 46, + "column": 36, "line": 9, }, }, - "name": "T", "range": Array [ - 204, - 205, + 194, + 199, ], - "type": "Identifier", + "type": "TSArrayType", }, }, }, - "typeParameters": null, + "loc": Object { + "end": Object { + "column": 41, + "line": 9, + }, + "start": Object { + "column": 27, + "line": 9, + }, + }, + "range": Array [ + 185, + 199, + ], + "type": "RestElement", }, + ], + "range": Array [ + 180, + 205, + ], + "type": "TSConstructorType", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 48, + "column": 47, "line": 9, }, "start": Object { - "column": 5, + "column": 44, "line": 9, }, }, "range": Array [ - 163, - 206, + 202, + 205, ], - "type": "VariableDeclarator", - "typeParameters": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 19, + "column": 47, "line": 9, }, "start": Object { - "column": 16, + "column": 46, "line": 9, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "name": "T", - "range": Array [ - 175, - 176, - ], - "type": "TSTypeParameter", - }, - ], "range": Array [ - 174, - 177, + 204, + 205, ], - "type": "TSTypeParameterDeclaration", + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 46, + "line": 9, + }, + }, + "name": "T", + "range": Array [ + 204, + 205, + ], + "type": "Identifier", + }, }, }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 48, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, + "typeParameters": null, + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 9, + }, + "start": Object { + "column": 16, + "line": 9, + }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 9, + }, + }, + "name": "T", + "range": Array [ + 175, + 176, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 174, + 177, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 158, - 206, - ], - "type": "VariableDeclaration", }, ], "comments": Array [], @@ -20361,6 +20340,7 @@ Object { ], "type": "ClassBody", }, + "declare": true, "id": Object { "loc": Object { "end": Object { @@ -20640,7 +20620,7 @@ Object { "body": Array [ Object { "async": false, - "body": null, + "declare": true, "expression": false, "generator": false, "id": Object { @@ -23053,112 +23033,92 @@ Object { "body": Array [ Object { "declaration": Object { - "declarations": Array [ - Object { - "id": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "TestAlias", + "range": Array [ + 12, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 40, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 39, + ], + "type": "TSUnionType", + "types": Array [ + Object { "loc": Object { "end": Object { - "column": 21, + "column": 30, "line": 1, }, "start": Object { - "column": 12, + "column": 24, "line": 1, }, }, - "name": "TestAlias", "range": Array [ - 12, - 21, + 24, + 30, ], - "type": "Identifier", + "type": "TSStringKeyword", }, - "init": Object { + Object { "loc": Object { "end": Object { "column": 39, "line": 1, }, "start": Object { - "column": 24, + "column": 33, "line": 1, }, }, "range": Array [ - 24, + 33, 39, ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 39, - ], - "type": "TSNumberKeyword", - }, - ], - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "type": "TSNumberKeyword", }, - "range": Array [ - 12, - 40, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, + ], }, - "range": Array [ - 7, - 40, - ], - "type": "VariableDeclaration", }, "loc": Object { "end": Object { @@ -23350,148 +23310,128 @@ Object { "body": Array [ Object { "declaration": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "TestClassProps", + "range": Array [ + 12, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 51, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, + "name": "count", + "range": Array [ + 35, + 40, + ], + "type": "Identifier", }, - "name": "TestClassProps", - "range": Array [ - 12, - 26, - ], - "type": "Identifier", - }, - "init": Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 29, - "line": 1, + "column": 4, + "line": 2, }, }, - "members": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "count", - "range": Array [ - 35, - 40, - ], - "type": "Identifier", + "range": Array [ + 35, + 48, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, }, + }, + "range": Array [ + 40, + 48, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { "column": 17, "line": 2, }, "start": Object { - "column": 4, + "column": 11, "line": 2, }, }, "range": Array [ - 35, + 42, 48, ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 40, - 48, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "TSNumberKeyword", - }, - }, + "type": "TSNumberKeyword", }, - ], - "range": Array [ - 29, - 50, - ], - "type": "TSTypeLiteral", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 1, }, }, - "range": Array [ - 12, - 51, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, + ], + "range": Array [ + 29, + 50, + ], + "type": "TSTypeLiteral", }, - "range": Array [ - 7, - 51, - ], - "type": "VariableDeclaration", }, "loc": Object { "end": Object { @@ -23719,165 +23659,145 @@ Object { "body": Array [ Object { "declaration": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "TestCallback", - "range": Array [ - 12, - 24, - ], - "type": "Identifier", + "id": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "TestCallback", + "range": Array [ + 12, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 47, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, }, - "init": Object { + }, + "parameters": Array [ + Object { "loc": Object { "end": Object { - "column": 46, + "column": 37, "line": 1, }, "start": Object { - "column": 27, + "column": 28, "line": 1, }, }, - "parameters": Array [ - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 28, - 37, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], + "name": "a", "range": Array [ - 27, - 46, + 28, + 37, ], - "type": "TSFunctionType", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 46, + "column": 37, "line": 1, }, "start": Object { - "column": 40, + "column": 29, "line": 1, }, }, "range": Array [ - 40, - 46, + 29, + 37, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 46, + "column": 37, "line": 1, }, "start": Object { - "column": 42, + "column": 31, "line": 1, }, }, "range": Array [ - 42, - 46, + 31, + 37, ], - "type": "TSVoidKeyword", + "type": "TSNumberKeyword", }, }, - "typeParameters": null, }, + ], + "range": Array [ + 27, + 46, + ], + "type": "TSFunctionType", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 47, + "column": 46, "line": 1, }, "start": Object { - "column": 12, + "column": 40, "line": 1, }, }, "range": Array [ - 12, - 47, + 40, + 46, ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 46, + ], + "type": "TSVoidKeyword", + }, }, + "typeParameters": null, }, - "range": Array [ - 7, - 47, - ], - "type": "VariableDeclaration", }, "loc": Object { "end": Object { @@ -28855,296 +28775,256 @@ exports[`typescript fixtures/basics/import-type.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "init": Object { - "isTypeOf": true, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "isTypeOf": true, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "parameter": Object { + "literal": Object { "loc": Object { "end": Object { - "column": 27, + "column": 26, "line": 1, }, "start": Object { - "column": 9, + "column": 23, "line": 1, }, }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "raw": "'A'", - "type": "Literal", - "value": "A", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "TSLiteralType", - }, - "qualifier": null, "range": Array [ - 9, - 27, + 23, + 26, ], - "type": "TSImportType", - "typeParameters": null, + "raw": "'A'", + "type": "Literal", + "value": "A", }, "loc": Object { "end": Object { - "column": 28, + "column": 26, "line": 1, }, "start": Object { - "column": 5, + "column": 23, "line": 1, }, }, "range": Array [ - 5, - 28, + 23, + 26, ], - "type": "VariableDeclarator", + "type": "TSLiteralType", }, - ], - "kind": "type", + "qualifier": null, + "range": Array [ + 9, + 27, + ], + "type": "TSImportType", + "typeParameters": null, + }, + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "B", + "range": Array [ + 34, + 35, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 26, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 28, + 29, + 55, ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "isTypeOf": false, + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "parameter": Object { + "literal": Object { "loc": Object { "end": Object { - "column": 6, + "column": 19, "line": 2, }, "start": Object { - "column": 5, + "column": 16, "line": 2, }, }, - "name": "B", "range": Array [ - 34, - 35, + 45, + 48, ], - "type": "Identifier", + "raw": "\\"B\\"", + "type": "Literal", + "value": "B", }, - "init": Object { - "isTypeOf": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "raw": "\\"B\\"", - "type": "Literal", - "value": "B", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "TSLiteralType", + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 45, + 48, + ], + "type": "TSLiteralType", + }, + "qualifier": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "name": "X", + "range": Array [ + 50, + 51, + ], + "type": "Identifier", + }, + "range": Array [ + 38, + 54, + ], + "type": "TSImportType", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, }, - "qualifier": Object { + "start": Object { + "column": 22, + "line": 2, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 22, + "column": 24, "line": 2, }, "start": Object { - "column": 21, + "column": 23, "line": 2, }, }, - "name": "X", "range": Array [ - 50, - 51, + 52, + 53, ], - "type": "Identifier", - }, - "range": Array [ - 38, - 54, - ], - "type": "TSImportType", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, }, - "range": Array [ - 52, - 53, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "Y", - "range": Array [ - 52, - 53, - ], - "type": "Identifier", + "start": Object { + "column": 23, + "line": 2, }, }, - ], - "range": Array [ - 51, - 54, - ], - "type": "TSTypeParameterInstantiation", + "name": "Y", + "range": Array [ + 52, + 53, + ], + "type": "Identifier", + }, }, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, + ], "range": Array [ - 34, - 55, + 51, + 54, ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, + "type": "TSTypeParameterInstantiation", }, }, - "range": Array [ - 29, - 55, - ], - "type": "VariableDeclaration", }, ], "comments": Array [], @@ -29569,221 +29449,201 @@ exports[`typescript fixtures/basics/import-type-with-type-parameters-in-type-ref Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 29, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, }, - "name": "X", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "name": "A", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, }, - "range": Array [ - 9, - 29, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", + "start": Object { + "column": 10, + "line": 1, }, - "typeParameters": Object { + }, + "params": Array [ + Object { + "isTypeOf": false, "loc": Object { "end": Object { - "column": 29, + "column": 28, "line": 1, }, "start": Object { - "column": 10, + "column": 11, "line": 1, }, }, - "params": Array [ - Object { - "isTypeOf": false, + "parameter": Object { + "literal": Object { "loc": Object { "end": Object { - "column": 28, + "column": 20, "line": 1, }, "start": Object { - "column": 11, + "column": 18, "line": 1, }, }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "TSLiteralType", - }, - "qualifier": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "B", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, "range": Array [ - 11, - 28, + 18, + 20, ], - "type": "TSImportType", - "typeParameters": Object { + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "TSLiteralType", + }, + "qualifier": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "B", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "range": Array [ + 11, + 28, + ], + "type": "TSImportType", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 28, + "column": 27, "line": 1, }, "start": Object { - "column": 23, + "column": 24, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "TSAnyKeyword", - }, - ], "range": Array [ - 23, - 28, + 24, + 27, ], - "type": "TSTypeParameterInstantiation", + "type": "TSAnyKeyword", }, - }, - ], - "range": Array [ - 10, - 29, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, + ], + "range": Array [ + 23, + 28, + ], + "type": "TSTypeParameterInstantiation", + }, }, - }, + ], "range": Array [ - 5, - 30, + 10, + 29, ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "TSTypeParameterInstantiation", }, }, - "range": Array [ - 0, - 30, - ], - "type": "VariableDeclaration", }, ], "comments": Array [], @@ -30100,7 +29960,6 @@ exports[`typescript fixtures/basics/interface-extends.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -30325,7 +30184,6 @@ exports[`typescript fixtures/basics/interface-extends-multiple.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -30621,7 +30479,6 @@ exports[`typescript fixtures/basics/interface-type-parameters.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -30865,7 +30722,6 @@ exports[`typescript fixtures/basics/interface-with-all-property-types.src 1`] = Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -34165,7 +34021,6 @@ exports[`typescript fixtures/basics/interface-with-construct-signature-with-para Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -34573,7 +34428,6 @@ exports[`typescript fixtures/basics/interface-with-extends-type-parameters.src 1 Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -34997,7 +34851,6 @@ exports[`typescript fixtures/basics/interface-with-generic.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -35241,7 +35094,6 @@ exports[`typescript fixtures/basics/interface-with-jsdoc.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -35566,7 +35418,6 @@ exports[`typescript fixtures/basics/interface-with-optional-properties.src 1`] = Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -36355,7 +36206,6 @@ exports[`typescript fixtures/basics/interface-without-type-annotation.src 1`] = Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -36581,97 +36431,24 @@ exports[`typescript fixtures/basics/keyof-operator.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "operator": "keyof", - "range": Array [ - 9, - 18, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - }, + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 5, - 19, - ], - "type": "VariableDeclarator", }, - ], - "kind": "type", + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { "column": 19, @@ -36686,7 +36463,60 @@ Object { 0, 19, ], - "type": "VariableDeclaration", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "operator": "keyof", + "range": Array [ + 9, + 18, + ], + "type": "TSTypeOperator", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + }, + }, }, ], "comments": Array [], @@ -40623,30 +40453,60 @@ exports[`typescript fixtures/basics/type-alias-declaration.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Result", - "range": Array [ - 5, - 11, - ], - "type": "Identifier", + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, }, - "init": Object { + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Result", + "range": Array [ + 5, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 37, + ], + "type": "TSUnionType", + "types": Array [ + Object { "loc": Object { "end": Object { - "column": 37, + "column": 27, "line": 1, }, "start": Object { @@ -40656,206 +40516,156 @@ Object { }, "range": Array [ 17, - 37, + 27, ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, }, - "range": Array [ - 17, - 27, - ], - "type": "TSTypeReference", - "typeName": Object { + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "Success", + "range": Array [ + 17, + 24, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 24, + "column": 26, "line": 1, }, "start": Object { - "column": 17, + "column": 25, "line": 1, }, }, - "name": "Success", "range": Array [ - 17, - 24, + 25, + 26, ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, }, - "range": Array [ - 25, - 26, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", + "start": Object { + "column": 25, + "line": 1, }, }, - ], - "range": Array [ - 24, - 27, - ], - "type": "TSTypeParameterInstantiation", + "name": "T", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, }, + ], + "range": Array [ + 24, + 27, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 37, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, }, - "range": Array [ - 30, - 37, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "Failure", - "range": Array [ - 30, - 37, - ], - "type": "Identifier", + "start": Object { + "column": 30, + "line": 1, }, }, - ], - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, + "name": "Failure", + "range": Array [ + 30, + 37, + ], + "type": "Identifier", }, }, - "range": Array [ - 5, - 37, - ], - "type": "VariableDeclarator", - "typeParameters": Object { + ], + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 12, - 13, - ], - "type": "TSTypeParameter", - }, - ], + "name": "T", "range": Array [ - 11, - 14, + 12, + 13, ], - "type": "TSTypeParameterDeclaration", + "type": "TSTypeParameter", }, - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + ], + "range": Array [ + 11, + 14, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 37, - ], - "type": "VariableDeclaration", }, ], "comments": Array [], @@ -41100,30 +40910,60 @@ exports[`typescript fixtures/basics/type-alias-declaration-with-constrained-type Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Result", - "range": Array [ - 5, - 11, - ], - "type": "Identifier", + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, }, - "init": Object { + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Result", + "range": Array [ + 5, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 48, + ], + "type": "TSUnionType", + "types": Array [ + Object { "loc": Object { "end": Object { - "column": 48, + "column": 38, "line": 1, }, "start": Object { @@ -41133,224 +40973,174 @@ Object { }, "range": Array [ 28, - 48, + 38, ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, }, - "range": Array [ - 28, - 38, - ], - "type": "TSTypeReference", - "typeName": Object { + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "Success", + "range": Array [ + 28, + 35, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 35, + "column": 37, "line": 1, }, "start": Object { - "column": 28, + "column": 36, "line": 1, }, }, - "name": "Success", "range": Array [ - 28, - 35, + 36, + 37, ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, }, - "range": Array [ - 36, - 37, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 36, - 37, - ], - "type": "Identifier", + "start": Object { + "column": 36, + "line": 1, }, }, - ], - "range": Array [ - 35, - 38, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 48, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, + "name": "T", + "range": Array [ + 36, + 37, + ], + "type": "Identifier", }, - "name": "Failure", - "range": Array [ - 41, - 48, - ], - "type": "Identifier", }, - }, - ], - }, - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, + ], + "range": Array [ + 35, + 38, + ], + "type": "TSTypeParameterInstantiation", }, }, - "range": Array [ - 5, - 48, - ], - "type": "VariableDeclarator", - "typeParameters": Object { + Object { "loc": Object { "end": Object { - "column": 25, + "column": 48, "line": 1, }, "start": Object { - "column": 11, + "column": 41, "line": 1, }, }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 22, - 24, - ], - "type": "TSTypeLiteral", + "range": Array [ + 41, + 48, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "start": Object { + "column": 41, + "line": 1, }, - "name": "T", - "range": Array [ - 12, - 24, - ], - "type": "TSTypeParameter", }, - ], + "name": "Failure", + "range": Array [ + 41, + 48, + ], + "type": "Identifier", + }, + }, + ], + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "params": Array [ + Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 22, + 24, + ], + "type": "TSTypeLiteral", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "T", "range": Array [ - 11, - 25, + 12, + 24, ], - "type": "TSTypeParameterDeclaration", + "type": "TSTypeParameter", }, - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + ], + "range": Array [ + 11, + 25, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 48, - ], - "type": "VariableDeclaration", }, ], "comments": Array [], @@ -41649,184 +41439,164 @@ exports[`typescript fixtures/basics/type-alias-object-without-annotation.src 1`] Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, }, + "name": "bar", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", }, - "name": "foo", - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - }, - "init": Object { "loc": Object { "end": Object { - "column": 29, + "column": 24, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, - "members": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "range": Array [ + 12, + 24, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, }, - "range": Array [ - 12, - 24, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 23, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 23, - ], - "type": "TSStringKeyword", - }, + "start": Object { + "column": 15, + "line": 1, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - }, + "range": Array [ + 15, + 23, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 28, + "column": 23, "line": 1, }, "start": Object { - "column": 25, + "column": 17, "line": 1, }, }, "range": Array [ - 25, - 28, + 17, + 23, ], - "type": "TSPropertySignature", + "type": "TSStringKeyword", }, - ], - "range": Array [ - 11, - 29, - ], - "type": "TSTypeLiteral", + }, }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 25, + 28, + ], + "type": "Identifier", }, - "start": Object { - "column": 5, - "line": 1, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, }, + "range": Array [ + 25, + 28, + ], + "type": "TSPropertySignature", }, - "range": Array [ - 5, - 30, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + ], + "range": Array [ + 11, + 29, + ], + "type": "TSTypeLiteral", }, - "range": Array [ - 0, - 30, - ], - "type": "VariableDeclaration", }, ], "comments": Array [], @@ -44137,7 +43907,6 @@ exports[`typescript fixtures/basics/typed-this.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -44918,79 +44687,24 @@ exports[`typescript fixtures/basics/unique-symbol.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "operator": "unique", - "range": Array [ - 9, - 22, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "TSSymbolKeyword", - }, + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 5, - 23, - ], - "type": "VariableDeclarator", }, - ], - "kind": "type", + "name": "A", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { "column": 23, @@ -45005,7 +44719,42 @@ Object { 0, 23, ], - "type": "VariableDeclaration", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "operator": "unique", + "range": Array [ + 9, + 22, + ], + "type": "TSTypeOperator", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "TSSymbolKeyword", + }, + }, }, ], "comments": Array [], @@ -58764,7 +58513,6 @@ exports[`typescript fixtures/errorRecovery/decorator-on-interface-declaration.sr Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -59722,7 +59470,6 @@ exports[`typescript fixtures/errorRecovery/interface-empty-extends.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -59893,7 +59640,6 @@ exports[`typescript fixtures/errorRecovery/interface-property-modifiers.src 1`] Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -66117,7 +65863,6 @@ Object { Object { "declaration": Object { "async": false, - "body": null, "expression": false, "generator": false, "id": Object { @@ -67954,7 +67699,6 @@ Object { "body": Array [ Object { "declaration": Object { - "abstract": false, "body": Object { "body": Array [ Object { diff --git a/visitor-keys.js b/visitor-keys.js index 40a5e49..1803e8a 100644 --- a/visitor-keys.js +++ b/visitor-keys.js @@ -23,6 +23,7 @@ module.exports = Evk.unionWith({ CallExpression: ["callee", "typeParameters", "arguments"], // Additional Nodes. + BigIntLiteral: [], ClassProperty: ["decorators", "key", "typeAnnotation", "value"], Decorator: ["expression"], TSAbstractClassProperty: ["decorators", "key", "typeAnnotation", "value"], @@ -74,6 +75,7 @@ module.exports = Evk.unionWith({ TSStringKeyword: [], TSSymbolKeyword: [], TSTypeAnnotation: ["typeAnnotation"], + TSTypeAliasDeclaration: ["id", "typeParameters", "typeAnnotation"], TSTypeLiteral: ["members"], TSTypeOperator: ["typeAnnotation"], TSTypeParameter: ["constraint", "default"],