From bff3ffb6ed4210bf2662b3a143eb9e00d9390bd9 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Wed, 20 Dec 2023 16:15:04 -0500 Subject: [PATCH 001/165] new rule, pairing w/ josh --- .../rules/no-unnecessary-type-parameters.ts | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts new file mode 100644 index 000000000000..2bf54d5d2222 --- /dev/null +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -0,0 +1,128 @@ +/* eslint-disable */ +import type { TSESTree } from '@typescript-eslint/utils'; +import * as ts from 'typescript'; + +import { createRule, getParserServices } from '../util'; + +type ESTreeFunctionLikeWithTypeParameters = TSESTree.FunctionLike & { + typeParameters: {}; +}; + +type TSSignatureDeclarationWithTypeParameters = ts.SignatureDeclaration & { + typeParameters: {}; +}; + +export default createRule({ + defaultOptions: [], + meta: { + docs: { + description: 'Disallow signatures using a generic parameter only once', + }, + messages: { + never: 'Type parameter {{name}} is never used.', + sole: 'Type parameter {{name}} is used only once.', + }, + schema: [], + type: 'problem', + }, + name: 'no-unnecessary-generics', + create(context) { + return { + [[ + 'ArrowFunctionExpression[typeParameters]', + 'FunctionDeclaration[typeParameters]', + 'FunctionExpression[typeParameters]', + 'TSCallSignatureDeclaration[typeParameters]', + 'TSConstructorType[typeParameters]', + 'TSDeclareFunction[typeParameters]', + 'TSFunctionType[typeParameters]', + 'TSMethodSignature[typeParameters]', + ].join(', ')](esNode: ESTreeFunctionLikeWithTypeParameters): void { + const parserServices = getParserServices(context); + const tsNode = parserServices.esTreeNodeToTSNodeMap.get( + esNode, + ) as TSSignatureDeclarationWithTypeParameters; + if (!tsNode.typeParameters) { + return; + } + + const checker = parserServices.program.getTypeChecker(); + + for (const typeParameter of tsNode.typeParameters) { + const result = getSoleUse( + tsNode, + assertDefined(checker.getSymbolAtLocation(typeParameter.name)), + checker, + ); + + if (result === 'ok') { + continue; + } + + context.report({ + data: { name: typeParameter.name.text }, + messageId: result, + node: parserServices.tsNodeToESTreeNodeMap.get(typeParameter), + }); + } + }, + }; + }, +}); + +type Result = 'ok' | 'never' | 'sole'; + +function getSoleUse( + sig: ts.SignatureDeclaration, + typeParameterSymbol: ts.Symbol, + checker: ts.TypeChecker, +): Result { + const exit = {}; + let soleUse: ts.Identifier | undefined; + + try { + if (sig.typeParameters) { + for (const tp of sig.typeParameters) { + if (tp.constraint) { + recur(tp.constraint); + } + } + } + for (const param of sig.parameters) { + if (param.type) { + recur(param.type); + } + } + if (sig.type) { + recur(sig.type); + } + } catch (err) { + if (err === exit) { + return 'ok'; + } + throw err; + } + + return soleUse ? 'sole' : 'never'; + + function recur(node: ts.Node): void { + if (ts.isIdentifier(node)) { + if (checker.getSymbolAtLocation(node) === typeParameterSymbol) { + if (soleUse === undefined) { + soleUse = node; + } else { + throw exit; + } + } + } else { + node.forEachChild(recur); + } + } +} + +function assertDefined(value: T | undefined): T { + if (value === undefined) { + throw new Error('unreachable'); + } + return value; +} From b3a2ba23459950cab09c36cbf8e488b540d1fc28 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Wed, 20 Dec 2023 16:32:16 -0500 Subject: [PATCH 002/165] start adding tests, discover some problesm --- .../rules/no-unnecessary-type-parameters.ts | 1 + .../no-unnecessary-type-parameters.test.ts | 167 ++++++++++++++++++ 2 files changed, 168 insertions(+) create mode 100644 packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 2bf54d5d2222..39f9b2366ab4 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -19,6 +19,7 @@ export default createRule({ description: 'Disallow signatures using a generic parameter only once', }, messages: { + // TODO: remove this, it's already covered by no-unused-vars never: 'Type parameter {{name}} is never used.', sole: 'Type parameter {{name}} is used only once.', }, diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts new file mode 100644 index 000000000000..852f86f5a5cf --- /dev/null +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -0,0 +1,167 @@ +import { RuleTester } from '@typescript-eslint/rule-tester'; + +import rule from '../../src/rules/no-unnecessary-type-parameters'; +import { getFixturesRootDir } from '../RuleTester'; + +const rootPath = getFixturesRootDir(); + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', + parserOptions: { + sourceType: 'module', + tsconfigRootDir: rootPath, + project: './tsconfig.json', + }, +}); + +ruleTester.run('no-unnecessary-type-parameters', rule, { + valid: [ + { + code: ` + declare function get(): void; + declare function get(param: T[]): T; + `, + }, + { + code: ` + declare function identity(param: T): T; // this is valid as it constrains the return type to the parameter type + `, + }, + { + code: ` + declare function compare(param1: T, param2: T): boolean; // this is valid because it enforces comparable types for both parameters + `, + }, + // Dan and Josh disagree with this; U only appears once, therefore it's invalid. + // { + // code: ` + // declare function compare(param1: T, param2: U): boolean; // this is also valid because T constrains U + // `, + // }, + ` + function getProperty(obj: T, key: K) { + return obj[key]; + } + `, + { + code: ` + // The inferred return type is V, therefore this is valid. + function doStuff(map: Map, key: K) { + let v = map.get(key); + v = 1; // this error disappears if V is replaced with any/unknown + map.set(key, v); + return v; // signature has implicit return type V, but we cannot know that without type information + } + `, + }, + // { + // code: stripIndent` + // // https://github.com/cartant/eslint-plugin-etc/issues/15 + // /** + // * Call two functions with the same args, e.g. + // * + // * onClick={both(action('click'), setState)} + // */ + // export function both< + // Args extends unknown[], + // CB1 extends (...args: Args) => void, + // CB2 extends (...args: Args) => void + // >(fn1: CB1, fn2: CB2): (...args: Args) => void { + // // See https://stackoverflow.com/a/62093430/388951 + // return function (...args: Args) { + // fn1(...args); + // fn2(...args); + // }; + // } + // `, + // }, + ], + invalid: [ + { + code: ` + declare function get(): T; + // ~ [cannotInfer { "name": "T" }] + get(); + `, + errors: [ + { + messageId: 'sole', + }, + ], + }, + ], + /* + }), + ` + declare function get(): T; + ~~~~~~~~~~~~~~~~ [cannotInfer { "name": "T" }] + declare function get(param: U): U; + ~ [cannotInfer { "name": "T" }] + declare function get(param: T): U; + ~~~~~~~~~~~~~~~ [cannotInfer { "name": "U" }] + declare function get(param: Record): boolean; + ~~~~~~~~~~~~~~~~ [canReplace { "name": "T", "replacement": "string" }] + ~ [canReplace { "name": "U", "replacement": "unknown" }] + declare function get(param: (param: T) => U): T; + ~ [cannotInfer { "name": "T" }] + ~ [canReplace { "name": "T", "replacement": "unknown" }] + ~ [cannotInfer { "name": "U" }] + `), + fromFixture(stripIndent` + function fn(param: string) { + ~ [cannotInfer { "name": "T" }] + let v: T = null!; + return v; + } + `), + fromFixture(stripIndent` + declare class C { + method(param: T): U; + ~ [canReplace { "name": "T", "replacement": "unknown" }] + ~ [cannotInfer { "name": "U" }] + prop: () => T; + ~ [cannotInfer { "name": "T" }] + } + `), + fromFixture(stripIndent` + const func = (param): T => null!; + ~ [cannotInfer { "name": "T" }] + `), + // This test should fail, but it doesn't because the implementation tests + // the signature with: + // + // tsutils.isFunctionWithBody(signature) + // + // And if that returns true, the implementation assumes that the type + // parameter is used. + // + // fromFixture(stripIndent` + // // https://github.com/cartant/eslint-plugin-etc/issues/30 + // const func = (param: T) => null; + // ~ [canReplace { "name": "T", "replacement": "unknown" }] + // `), + fromFixture(stripIndent` + declare function take(param: T): void; // T not used as constraint -> could just be any/unknown + ~ [canReplace { "name": "T", "replacement": "unknown" }] + declare function take(param: T): void; // could just use object + ~~~~~~~~~~~~~~~~ [canReplace { "name": "T", "replacement": "object" }] + declare function take(param1: T, param2: U): void; // no constraint + ~ [canReplace { "name": "T", "replacement": "unknown" }] + ~~~~~ [canReplace { "name": "U", "replacement": "unknown" }] + declare function take(param: T): U; // U is only used in the return type + ~~~~~~~~~~~ [cannotInfer { "name": "U" }] + declare function take(param: U): U; // T cannot be inferred + ~ [cannotInfer { "name": "T" }] + `), + fromFixture(stripIndent` + declare class Foo { + prop: string; + getProp(this: Record<'prop', T>): T; + compare(this: Record<'prop', T>, other: Record<'prop', T>): number; + foo(this: T): void; + ~ [canReplace { "name": "T", "replacement": "unknown" }] + } + `), + ], + */ +}); From fecd3057f85dc05e922c80c1c4873dc93a9585a3 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Wed, 20 Dec 2023 17:09:21 -0500 Subject: [PATCH 003/165] failing testgs --- .../rules/no-unnecessary-type-parameters.ts | 163 ++++++++++-------- .../no-unnecessary-type-parameters.test.ts | 63 ++++++- 2 files changed, 152 insertions(+), 74 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 39f9b2366ab4..789604a76aaf 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -1,6 +1,7 @@ /* eslint-disable */ import type { TSESTree } from '@typescript-eslint/utils'; import * as ts from 'typescript'; +import * as tsutils from 'ts-api-utils'; import { createRule, getParserServices } from '../util'; @@ -28,6 +29,62 @@ export default createRule({ }, name: 'no-unnecessary-generics', create(context) { + const parserServices = getParserServices(context); + let usage: Map | undefined; + function checkTypeParameters( + typeParameters: readonly ts.TypeParameterDeclaration[], + signature: ts.SignatureDeclaration, + ) { + if (usage === undefined) { + usage = tsutils.collectVariableUsage(signature.getSourceFile()); + } + + // XXX need to rewrite this (didn't even realize JS had labeled loops!) + outer: for (const typeParameter of typeParameters) { + let usedInParameters = false; + let usedInReturnOrExtends = isFunctionWithBody(signature); + for (const use of usage.get(typeParameter.name)!.uses) { + if ( + use.location.pos > signature.parameters.pos && + use.location.pos < signature.parameters.end + ) { + if (usedInParameters) { + continue outer; + } + usedInParameters = true; + } else if (!usedInReturnOrExtends) { + usedInReturnOrExtends = + use.location.pos > signature.parameters.end || + isUsedInConstraint(use.location, typeParameters); + } + } + // XXX why are these handled differently? + if (!usedInParameters) { + context.report({ + data: { + name: typeParameter.name.text, + }, + node: parserServices.tsNodeToESTreeNodeMap.get(typeParameter), + messageId: 'sole', + }); + } else if ( + !usedInReturnOrExtends + // && !isConstrainedByOtherTypeParameter(typeParameter, typeParameters) + ) { + context.report({ + data: { + name: typeParameter.name.text, + replacement: typeParameter.constraint + ? typeParameter.constraint.getText(signature.getSourceFile()) + : 'unknown', + }, + node: parserServices.tsNodeToESTreeNodeMap.get(typeParameter), + messageId: 'sole', + }); + } + } + } + return { [[ 'ArrowFunctionExpression[typeParameters]', @@ -39,7 +96,6 @@ export default createRule({ 'TSFunctionType[typeParameters]', 'TSMethodSignature[typeParameters]', ].join(', ')](esNode: ESTreeFunctionLikeWithTypeParameters): void { - const parserServices = getParserServices(context); const tsNode = parserServices.esTreeNodeToTSNodeMap.get( esNode, ) as TSSignatureDeclarationWithTypeParameters; @@ -47,83 +103,54 @@ export default createRule({ return; } - const checker = parserServices.program.getTypeChecker(); - - for (const typeParameter of tsNode.typeParameters) { - const result = getSoleUse( - tsNode, - assertDefined(checker.getSymbolAtLocation(typeParameter.name)), - checker, - ); + // const checker = parserServices.program.getTypeChecker(); - if (result === 'ok') { - continue; - } + checkTypeParameters(tsNode.typeParameters, tsNode); - context.report({ - data: { name: typeParameter.name.text }, - messageId: result, - node: parserServices.tsNodeToESTreeNodeMap.get(typeParameter), - }); - } + // if (result === 'ok') { + // continue; + // } + // + // context.report({ + // data: { name: typeParameter.name.text }, + // messageId: result, + // node: parserServices.tsNodeToESTreeNodeMap.get(typeParameter), + // }); }, }; }, }); -type Result = 'ok' | 'never' | 'sole'; - -function getSoleUse( - sig: ts.SignatureDeclaration, - typeParameterSymbol: ts.Symbol, - checker: ts.TypeChecker, -): Result { - const exit = {}; - let soleUse: ts.Identifier | undefined; - - try { - if (sig.typeParameters) { - for (const tp of sig.typeParameters) { - if (tp.constraint) { - recur(tp.constraint); - } - } - } - for (const param of sig.parameters) { - if (param.type) { - recur(param.type); - } - } - if (sig.type) { - recur(sig.type); - } - } catch (err) { - if (err === exit) { - return 'ok'; - } - throw err; - } - - return soleUse ? 'sole' : 'never'; - - function recur(node: ts.Node): void { - if (ts.isIdentifier(node)) { - if (checker.getSymbolAtLocation(node) === typeParameterSymbol) { - if (soleUse === undefined) { - soleUse = node; - } else { - throw exit; - } - } - } else { - node.forEachChild(recur); +function isUsedInConstraint( + use: ts.Identifier, + typeParameters: readonly ts.TypeParameterDeclaration[], +) { + for (const typeParameter of typeParameters) { + if ( + typeParameter.constraint !== undefined && + use.pos >= typeParameter.constraint.pos && + use.pos < typeParameter.constraint.end + ) { + return true; } } + return false; } -function assertDefined(value: T | undefined): T { - if (value === undefined) { - throw new Error('unreachable'); +export function isFunctionWithBody( + node: ts.Node, +): node is ts.FunctionLikeDeclaration & { body: {} } { + switch (node.kind) { + case ts.SyntaxKind.GetAccessor: + case ts.SyntaxKind.SetAccessor: + case ts.SyntaxKind.FunctionDeclaration: + case ts.SyntaxKind.MethodDeclaration: + case ts.SyntaxKind.Constructor: + return (node).body !== undefined; + case ts.SyntaxKind.FunctionExpression: + case ts.SyntaxKind.ArrowFunction: + return true; + default: + return false; } - return value; } diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 852f86f5a5cf..138df8169c0f 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -89,16 +89,67 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { }, ], }, + { + code: ` + declare function get(): T; + // ~~~~~~~~~~~~~~~~ [cannotInfer { "name": "T" }] + `, + errors: [ + { + messageId: 'sole', + }, + ], + }, + { + code: ` + declare function get(param: U): U; + // ~ [cannotInfer { "name": "T" }] + `, + errors: [ + { + messageId: 'sole', + }, + ], + }, + { + code: ` + declare function get(param: T): U; + // ~~~~~~~~~~~~~~~ [cannotInfer { "name": "U" }] + `, + errors: [ + { + messageId: 'sole', + }, + ], + }, + { + only: true, + code: ` + function printProperty(obj: T, key: K) { + console.log(obj[key]); + } + `, + errors: [ + { + messageId: 'sole', + }, + ], + }, + // { + // code: ``, + // errors: [ + // { + // messageId: 'sole', + // } + // ] + // } ], /* }), ` - declare function get(): T; - ~~~~~~~~~~~~~~~~ [cannotInfer { "name": "T" }] - declare function get(param: U): U; - ~ [cannotInfer { "name": "T" }] - declare function get(param: T): U; - ~~~~~~~~~~~~~~~ [cannotInfer { "name": "U" }] + + + declare function get(param: Record): boolean; ~~~~~~~~~~~~~~~~ [canReplace { "name": "T", "replacement": "string" }] ~ [canReplace { "name": "U", "replacement": "unknown" }] From fd14c5c16e3e253ff0cbaf05c6584471eb5deb02 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Fri, 22 Dec 2023 15:01:35 -0500 Subject: [PATCH 004/165] very simple version that fails with inferred return types --- .../rules/no-unnecessary-type-parameters.ts | 26 ++++++++++++++----- .../no-unnecessary-type-parameters.test.ts | 15 ++++++----- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 789604a76aaf..49e0f0ac959e 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -20,8 +20,6 @@ export default createRule({ description: 'Disallow signatures using a generic parameter only once', }, messages: { - // TODO: remove this, it's already covered by no-unused-vars - never: 'Type parameter {{name}} is never used.', sole: 'Type parameter {{name}} is used only once.', }, schema: [], @@ -31,13 +29,11 @@ export default createRule({ create(context) { const parserServices = getParserServices(context); let usage: Map | undefined; + /* function checkTypeParameters( typeParameters: readonly ts.TypeParameterDeclaration[], signature: ts.SignatureDeclaration, ) { - if (usage === undefined) { - usage = tsutils.collectVariableUsage(signature.getSourceFile()); - } // XXX need to rewrite this (didn't even realize JS had labeled loops!) outer: for (const typeParameter of typeParameters) { @@ -84,6 +80,7 @@ export default createRule({ } } } + */ return { [[ @@ -105,7 +102,24 @@ export default createRule({ // const checker = parserServices.program.getTypeChecker(); - checkTypeParameters(tsNode.typeParameters, tsNode); + if (usage === undefined) { + usage = tsutils.collectVariableUsage(tsNode.getSourceFile()); + } + + for (const typeParameter of tsNode.typeParameters) { + const { uses } = usage.get(typeParameter.name)!; + if (uses.length === 1) { + context.report({ + data: { + name: typeParameter.name.text, + }, + node: parserServices.tsNodeToESTreeNodeMap.get(typeParameter), + messageId: 'sole', + }); + } + } + + // checkTypeParameters(tsNode.typeParameters, tsNode); // if (result === 'ok') { // continue; diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 138df8169c0f..4df901394694 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -38,11 +38,14 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { // declare function compare(param1: T, param2: U): boolean; // this is also valid because T constrains U // `, // }, - ` - function getProperty(obj: T, key: K) { - return obj[key]; - } - `, + { + only: true, + code: ` + function getProperty(obj: T, key: K) { + return obj[key]; + } + `, + }, { code: ` // The inferred return type is V, therefore this is valid. @@ -123,7 +126,7 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { ], }, { - only: true, + // only: true, code: ` function printProperty(obj: T, key: K) { console.log(obj[key]); From dea56bf0805191bbbf97e6ad4ba6e8a13977124d Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 11:04:18 -0500 Subject: [PATCH 005/165] some processing of inferred return types --- .../rules/no-unnecessary-type-parameters.ts | 157 +++++++----------- 1 file changed, 59 insertions(+), 98 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 49e0f0ac959e..2b48f556945c 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -1,7 +1,8 @@ /* eslint-disable */ import type { TSESTree } from '@typescript-eslint/utils'; -import * as ts from 'typescript'; +import { analyze } from '@typescript-eslint/scope-manager'; import * as tsutils from 'ts-api-utils'; +import * as ts from 'typescript'; import { createRule, getParserServices } from '../util'; @@ -29,58 +30,6 @@ export default createRule({ create(context) { const parserServices = getParserServices(context); let usage: Map | undefined; - /* - function checkTypeParameters( - typeParameters: readonly ts.TypeParameterDeclaration[], - signature: ts.SignatureDeclaration, - ) { - - // XXX need to rewrite this (didn't even realize JS had labeled loops!) - outer: for (const typeParameter of typeParameters) { - let usedInParameters = false; - let usedInReturnOrExtends = isFunctionWithBody(signature); - for (const use of usage.get(typeParameter.name)!.uses) { - if ( - use.location.pos > signature.parameters.pos && - use.location.pos < signature.parameters.end - ) { - if (usedInParameters) { - continue outer; - } - usedInParameters = true; - } else if (!usedInReturnOrExtends) { - usedInReturnOrExtends = - use.location.pos > signature.parameters.end || - isUsedInConstraint(use.location, typeParameters); - } - } - // XXX why are these handled differently? - if (!usedInParameters) { - context.report({ - data: { - name: typeParameter.name.text, - }, - node: parserServices.tsNodeToESTreeNodeMap.get(typeParameter), - messageId: 'sole', - }); - } else if ( - !usedInReturnOrExtends - // && !isConstrainedByOtherTypeParameter(typeParameter, typeParameters) - ) { - context.report({ - data: { - name: typeParameter.name.text, - replacement: typeParameter.constraint - ? typeParameter.constraint.getText(signature.getSourceFile()) - : 'unknown', - }, - node: parserServices.tsNodeToESTreeNodeMap.get(typeParameter), - messageId: 'sole', - }); - } - } - } - */ return { [[ @@ -100,14 +49,27 @@ export default createRule({ return; } - // const checker = parserServices.program.getTypeChecker(); + const checker = parserServices.program.getTypeChecker(); + + usage ??= tsutils.collectVariableUsage(tsNode.getSourceFile()); - if (usage === undefined) { - usage = tsutils.collectVariableUsage(tsNode.getSourceFile()); + const type = checker.getTypeAtLocation(tsNode); + const appType = checker.getApparentType(type); + const returns = type.getCallSignatures().map(s => s.getReturnType()); + // TODO: if the return type is declared explicitly then we can skip this. + let inferredCounts: Map | null = null; + if (returns.length) { + const returnTypeNode = returns[0]; + inferredCounts = collectTypeParameterUsage(checker, returnTypeNode); } for (const typeParameter of tsNode.typeParameters) { const { uses } = usage.get(typeParameter.name)!; + console.log( + 'inferred uses of', + typeParameter.name.text, + inferredCounts?.get(typeParameter.name), + ); if (uses.length === 1) { context.report({ data: { @@ -118,53 +80,52 @@ export default createRule({ }); } } - - // checkTypeParameters(tsNode.typeParameters, tsNode); - - // if (result === 'ok') { - // continue; - // } - // - // context.report({ - // data: { name: typeParameter.name.text }, - // messageId: result, - // node: parserServices.tsNodeToESTreeNodeMap.get(typeParameter), - // }); }, }; }, }); -function isUsedInConstraint( - use: ts.Identifier, - typeParameters: readonly ts.TypeParameterDeclaration[], -) { - for (const typeParameter of typeParameters) { - if ( - typeParameter.constraint !== undefined && - use.pos >= typeParameter.constraint.pos && - use.pos < typeParameter.constraint.end - ) { - return true; +function collectTypeParameterUsage( + checker: ts.TypeChecker, + rootType: ts.Type, +): Map { + const out = new Map(); + + const increment = (id: ts.Identifier): void => { + out.set(id, 1 + (out.get(id) ?? 0)); + }; + + const process = (type: ts.Type): void => { + console.log('process', checker.typeToString(type)); + if (tsutils.isTypeParameter(type)) { + for (const decl of type.getSymbol()?.getDeclarations() ?? []) { + console.log(' got a type parameter!'); + increment((decl as ts.TypeParameterDeclaration).name); + break; + } } - } - return false; -} + // XXX these should be "else if" but tsutils.isParameterType narrows type to never. + if (tsutils.isUnionOrIntersectionType(type)) { + type.types.forEach(process); + } else if (tsutils.isIndexedAccessType(type)) { + process(type.objectType); + process(type.indexType); + } else if (tsutils.isTypeReference(type)) { + for (const t of type.typeArguments ?? []) { + console.log(t); + process(t); + } + } + // If it's specifically a type parameter, then add it and we're done. + // Compound types: + // + union/intersection types + // - array/tuple types + // - object types + // - mapped types + // - types with generic type parameters + // - type predicate + }; -export function isFunctionWithBody( - node: ts.Node, -): node is ts.FunctionLikeDeclaration & { body: {} } { - switch (node.kind) { - case ts.SyntaxKind.GetAccessor: - case ts.SyntaxKind.SetAccessor: - case ts.SyntaxKind.FunctionDeclaration: - case ts.SyntaxKind.MethodDeclaration: - case ts.SyntaxKind.Constructor: - return (node).body !== undefined; - case ts.SyntaxKind.FunctionExpression: - case ts.SyntaxKind.ArrowFunction: - return true; - default: - return false; - } + process(rootType); + return out; } From 3cdeeee949c6b722cd5f1f957170ee1025f3e861 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 11:26:26 -0500 Subject: [PATCH 006/165] try to add inferred usages to count --- .../rules/no-unnecessary-type-parameters.ts | 27 ++++++++--------- .../no-unnecessary-type-parameters.test.ts | 29 ++++++++++++++++++- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 2b48f556945c..36dfed9ab7c0 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -53,24 +53,24 @@ export default createRule({ usage ??= tsutils.collectVariableUsage(tsNode.getSourceFile()); - const type = checker.getTypeAtLocation(tsNode); - const appType = checker.getApparentType(type); - const returns = type.getCallSignatures().map(s => s.getReturnType()); - // TODO: if the return type is declared explicitly then we can skip this. let inferredCounts: Map | null = null; - if (returns.length) { - const returnTypeNode = returns[0]; - inferredCounts = collectTypeParameterUsage(checker, returnTypeNode); + if (!tsNode.type) { + // We need to resolve and analyze the inferred return type to see + // whether it contains additional references to the type parameters. + const type = checker.getTypeAtLocation(tsNode); + const appType = checker.getApparentType(type); + const returns = type.getCallSignatures().map(s => s.getReturnType()); + if (returns.length) { + const returnTypeNode = returns[0]; + inferredCounts = collectTypeParameterUsage(checker, returnTypeNode); + } } for (const typeParameter of tsNode.typeParameters) { const { uses } = usage.get(typeParameter.name)!; - console.log( - 'inferred uses of', - typeParameter.name.text, - inferredCounts?.get(typeParameter.name), - ); - if (uses.length === 1) { + const inferredUses = inferredCounts?.get(typeParameter.name) ?? 0; + const numUses = uses.length + inferredUses; + if (numUses === 1) { context.report({ data: { name: typeParameter.name.text, @@ -124,6 +124,7 @@ function collectTypeParameterUsage( // - mapped types // - types with generic type parameters // - type predicate + // + indexed access types }; process(rootType); diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 4df901394694..fab9c246dbbf 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -17,6 +17,7 @@ const ruleTester = new RuleTester({ ruleTester.run('no-unnecessary-type-parameters', rule, { valid: [ { + // only: true, code: ` declare function get(): void; declare function get(param: T[]): T; @@ -39,7 +40,7 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { // `, // }, { - only: true, + // only: true, code: ` function getProperty(obj: T, key: K) { return obj[key]; @@ -57,6 +58,18 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { } `, }, + { + code: ` + // The inferred return type is Map, therefore this is valid. + function makeMap(ks: K[], vs: V[]) { + const r = new Map(); + ks.forEach((k, i) => { + r.set(k, vs[i]); + }); + return r; + } + `, + }, // { // code: stripIndent` // // https://github.com/cartant/eslint-plugin-etc/issues/15 @@ -138,6 +151,20 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { }, ], }, + { + code: ` + // The inferred return type is Map, but these are the sole uses + // of both type paramters, so this is invalid. + function makeMap() { + return new Map(); + } + `, + errors: [ + { + messageId: 'sole', + }, + ], + }, // { // code: ``, // errors: [ From 20c9399dec40282c643b96f04fd2ce099ea5c97d Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 11:32:29 -0500 Subject: [PATCH 007/165] 11/12 passing! --- .../src/rules/no-unnecessary-type-parameters.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 36dfed9ab7c0..feb70124a43b 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -58,7 +58,7 @@ export default createRule({ // We need to resolve and analyze the inferred return type to see // whether it contains additional references to the type parameters. const type = checker.getTypeAtLocation(tsNode); - const appType = checker.getApparentType(type); + // const appType = checker.getApparentType(type); const returns = type.getCallSignatures().map(s => s.getReturnType()); if (returns.length) { const returnTypeNode = returns[0]; @@ -70,6 +70,7 @@ export default createRule({ const { uses } = usage.get(typeParameter.name)!; const inferredUses = inferredCounts?.get(typeParameter.name) ?? 0; const numUses = uses.length + inferredUses; + // console.log('type parameter', typeParameter.name.text, 'explicit', uses.length, 'implicit', inferredUses); if (numUses === 1) { context.report({ data: { @@ -96,10 +97,10 @@ function collectTypeParameterUsage( }; const process = (type: ts.Type): void => { - console.log('process', checker.typeToString(type)); + // console.log('process', checker.typeToString(type)); if (tsutils.isTypeParameter(type)) { for (const decl of type.getSymbol()?.getDeclarations() ?? []) { - console.log(' got a type parameter!'); + // console.log(' got a type parameter!'); increment((decl as ts.TypeParameterDeclaration).name); break; } @@ -112,7 +113,7 @@ function collectTypeParameterUsage( process(type.indexType); } else if (tsutils.isTypeReference(type)) { for (const t of type.typeArguments ?? []) { - console.log(t); + // console.log(t); process(t); } } From edf54c5db7838759aaada904306225d8dfd30093 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 12:06:24 -0500 Subject: [PATCH 008/165] 12/12 pass --- .../src/rules/no-unnecessary-type-parameters.ts | 16 ++++++++++++++-- .../rules/no-unnecessary-type-parameters.test.ts | 9 +++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index feb70124a43b..34608b3b02b4 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -51,6 +51,7 @@ export default createRule({ const checker = parserServices.program.getTypeChecker(); + // XXX this collects a lot more usage than is needed for this rule. usage ??= tsutils.collectVariableUsage(tsNode.getSourceFile()); let inferredCounts: Map | null = null; @@ -58,7 +59,6 @@ export default createRule({ // We need to resolve and analyze the inferred return type to see // whether it contains additional references to the type parameters. const type = checker.getTypeAtLocation(tsNode); - // const appType = checker.getApparentType(type); const returns = type.getCallSignatures().map(s => s.getReturnType()); if (returns.length) { const returnTypeNode = returns[0]; @@ -66,10 +66,22 @@ export default createRule({ } } + let declEndPos = tsNode.end; + if ('body' in tsNode) { + declEndPos = tsNode.body?.getStart() ?? tsNode.end; + } + for (const typeParameter of tsNode.typeParameters) { const { uses } = usage.get(typeParameter.name)!; + let numExplicitUses = 0; + for (const use of uses) { + const pos = use.location.getStart(); + if (pos > tsNode.getStart() && pos < declEndPos) { + numExplicitUses++; + } + } const inferredUses = inferredCounts?.get(typeParameter.name) ?? 0; - const numUses = uses.length + inferredUses; + const numUses = numExplicitUses + inferredUses; // console.log('type parameter', typeParameter.name.text, 'explicit', uses.length, 'implicit', inferredUses); if (numUses === 1) { context.report({ diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index fab9c246dbbf..c6261bd6c005 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -161,6 +161,15 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `, errors: [ { + data: { + name: 'K', + }, + messageId: 'sole', + }, + { + data: { + name: 'V', + }, messageId: 'sole', }, ], From c2e3788d8c7ce881ea330ef883977d8e64b63a31 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 12:13:14 -0500 Subject: [PATCH 009/165] weird circular JSON error --- .../rules/no-unnecessary-type-parameters.ts | 23 ++++++++------- .../no-unnecessary-type-parameters.test.ts | 28 ++++++++++++++----- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 34608b3b02b4..fb9ae0cbe511 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -58,14 +58,16 @@ export default createRule({ if (!tsNode.type) { // We need to resolve and analyze the inferred return type to see // whether it contains additional references to the type parameters. + inferredCounts = new Map(); const type = checker.getTypeAtLocation(tsNode); - const returns = type.getCallSignatures().map(s => s.getReturnType()); - if (returns.length) { - const returnTypeNode = returns[0]; - inferredCounts = collectTypeParameterUsage(checker, returnTypeNode); + for (const sig of type.getCallSignatures()) { + const returnType = sig.getReturnType(); + collectTypeParameterUsage(returnTypeNode, inferredCounts); } } + // References to the type parameter in the function body are irrelevant + // for a valid type signature. let declEndPos = tsNode.end; if ('body' in tsNode) { declEndPos = tsNode.body?.getStart() ?? tsNode.end; @@ -82,7 +84,6 @@ export default createRule({ } const inferredUses = inferredCounts?.get(typeParameter.name) ?? 0; const numUses = numExplicitUses + inferredUses; - // console.log('type parameter', typeParameter.name.text, 'explicit', uses.length, 'implicit', inferredUses); if (numUses === 1) { context.report({ data: { @@ -99,13 +100,11 @@ export default createRule({ }); function collectTypeParameterUsage( - checker: ts.TypeChecker, rootType: ts.Type, -): Map { - const out = new Map(); - + counts: Map, +): void { const increment = (id: ts.Identifier): void => { - out.set(id, 1 + (out.get(id) ?? 0)); + counts.set(id, 1 + (counts.get(id) ?? 0)); }; const process = (type: ts.Type): void => { @@ -135,11 +134,11 @@ function collectTypeParameterUsage( // - array/tuple types // - object types // - mapped types - // - types with generic type parameters + // + types with generic type parameters // - type predicate // + indexed access types + // - conditional types }; process(rootType); - return out; } diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index c6261bd6c005..2e704d5f1355 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -139,7 +139,6 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { ], }, { - // only: true, code: ` function printProperty(obj: T, key: K) { console.log(obj[key]); @@ -148,6 +147,7 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { errors: [ { messageId: 'sole', + data: { name: 'K' }, }, ], }, @@ -161,15 +161,29 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `, errors: [ { - data: { - name: 'K', - }, + data: { name: 'K' }, + messageId: 'sole', + }, + { + data: { name: 'V' }, + messageId: 'sole', + }, + ], + }, + { + code: ` + // Same as the previous test, but with an explicit return type. + function makeMap(): Map { + return new Map(); + } + `, + errors: [ + { + data: { name: 'K' }, messageId: 'sole', }, { - data: { - name: 'V', - }, + data: { name: 'V' }, messageId: 'sole', }, ], From 87d30fedeb7e47c7b77181db09da4a3c89994788 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 12:17:29 -0500 Subject: [PATCH 010/165] oops --- .../eslint-plugin/src/rules/no-unnecessary-type-parameters.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index fb9ae0cbe511..437277bb1643 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -61,8 +61,7 @@ export default createRule({ inferredCounts = new Map(); const type = checker.getTypeAtLocation(tsNode); for (const sig of type.getCallSignatures()) { - const returnType = sig.getReturnType(); - collectTypeParameterUsage(returnTypeNode, inferredCounts); + collectTypeParameterUsage(sig.getReturnType(), inferredCounts); } } From 66ad82ab68585ab91741b9f5fbcf4c1dc2563919 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 12:20:53 -0500 Subject: [PATCH 011/165] add test with inferred tuple type --- .../tests/rules/no-unnecessary-type-parameters.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 2e704d5f1355..3404704844c3 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -70,6 +70,16 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { } `, }, + ` + // The inferred return type is [T, T][], which references T twice. + function arrayOfPairs() { + return [] as [T, T][]; + } + `, + ` + // Same as above but with an explicit return type. + declare function arrayOfPairs(): [T, T][]; + `, // { // code: stripIndent` // // https://github.com/cartant/eslint-plugin-etc/issues/15 From 9ff6aae074b0f1ea0d9115c5615ae6f869bfabe9 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 12:22:42 -0500 Subject: [PATCH 012/165] add test with inferred tuple type --- .../tests/rules/no-unnecessary-type-parameters.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 3404704844c3..1bc842106e80 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -80,6 +80,12 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { // Same as above but with an explicit return type. declare function arrayOfPairs(): [T, T][]; `, + ` + // T appears twice, once as a parameter type and once in the predicate. + function isNonNull(v: T): v is Exclude { + return v !== null; + } + `, // { // code: stripIndent` // // https://github.com/cartant/eslint-plugin-etc/issues/15 From 43b0424b140e3c08ac513b8c4aa9b7707184ce4f Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 12:31:05 -0500 Subject: [PATCH 013/165] failing test with inferred object type --- .../src/rules/no-unnecessary-type-parameters.ts | 7 ++++++- .../tests/rules/no-unnecessary-type-parameters.test.ts | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 437277bb1643..01430f0da3cb 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -121,7 +121,12 @@ function collectTypeParameterUsage( } else if (tsutils.isIndexedAccessType(type)) { process(type.objectType); process(type.indexType); + } else if (tsutils.isObjectType(type)) { + for (const sym of type.getProperties()) { + console.log(sym); + } } else if (tsutils.isTypeReference(type)) { + // This covers generic types like Map. for (const t of type.typeArguments ?? []) { // console.log(t); process(t); @@ -130,7 +135,7 @@ function collectTypeParameterUsage( // If it's specifically a type parameter, then add it and we're done. // Compound types: // + union/intersection types - // - array/tuple types + // + array/tuple types // - object types // - mapped types // + types with generic type parameters diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 1bc842106e80..96ca16b74313 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -86,6 +86,15 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { return v !== null; } `, + { + code: ` + // T appears in the inferred object return type, so this is OK. + function box(val: T) { + return { val }; + } + `, + only: true, + }, // { // code: stripIndent` // // https://github.com/cartant/eslint-plugin-etc/issues/15 From a5fcfc4afc3f74e1931fafff957fba2cf4005ece Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 12:47:37 -0500 Subject: [PATCH 014/165] descend into object types --- .../rules/no-unnecessary-type-parameters.ts | 19 +++++++++++------ .../no-unnecessary-type-parameters.test.ts | 21 ++++++++++--------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 01430f0da3cb..f848d3b1e6d4 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -61,7 +61,11 @@ export default createRule({ inferredCounts = new Map(); const type = checker.getTypeAtLocation(tsNode); for (const sig of type.getCallSignatures()) { - collectTypeParameterUsage(sig.getReturnType(), inferredCounts); + collectTypeParameterUsage( + checker, + sig.getReturnType(), + inferredCounts, + ); } } @@ -99,6 +103,7 @@ export default createRule({ }); function collectTypeParameterUsage( + checker: ts.TypeChecker, rootType: ts.Type, counts: Map, ): void { @@ -121,16 +126,18 @@ function collectTypeParameterUsage( } else if (tsutils.isIndexedAccessType(type)) { process(type.objectType); process(type.indexType); - } else if (tsutils.isObjectType(type)) { - for (const sym of type.getProperties()) { - console.log(sym); - } } else if (tsutils.isTypeReference(type)) { // This covers generic types like Map. for (const t of type.typeArguments ?? []) { - // console.log(t); process(t); } + } else if (tsutils.isObjectType(type)) { + // This covers inferred object types. This should be _after_ + // isTypeReference to avoid descending into all the properties of a + // generic interface/class, e.g. Map. + for (const sym of type.getProperties()) { + process(checker.getTypeOfSymbol(sym)); + } } // If it's specifically a type parameter, then add it and we're done. // Compound types: diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 96ca16b74313..578c38375d86 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -86,15 +86,16 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { return v !== null; } `, - { - code: ` - // T appears in the inferred object return type, so this is OK. - function box(val: T) { - return { val }; - } - `, - only: true, - }, + ` + // T appears in the inferred object return type, so this is OK. + function box(val: T) { + return { val }; + } + `, + ` + // Same as above but with an explicit return type. + declare function box(val: T): { val: T }; + `, // { // code: stripIndent` // // https://github.com/cartant/eslint-plugin-etc/issues/15 @@ -179,7 +180,7 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { { code: ` // The inferred return type is Map, but these are the sole uses - // of both type paramters, so this is invalid. + // of both type parameters, so this is invalid. function makeMap() { return new Map(); } From 1c06ec10b96be228c1b269904dd5bf846cac626c Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 12:49:43 -0500 Subject: [PATCH 015/165] copy over another test --- .../no-unnecessary-type-parameters.test.ts | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 578c38375d86..a59f6358a2e1 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -214,14 +214,21 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { }, ], }, - // { - // code: ``, - // errors: [ - // { - // messageId: 'sole', - // } - // ] - // } + { + code: ` + // Inferred return type is T, but this is still the sole usage. + function fn(param: string) { + let v: T = null!; + return v; + } + `, + errors: [ + { + data: { name: 'T' }, + messageId: 'sole', + }, + ], + }, ], /* }), @@ -238,11 +245,7 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { ~ [cannotInfer { "name": "U" }] `), fromFixture(stripIndent` - function fn(param: string) { - ~ [cannotInfer { "name": "T" }] - let v: T = null!; - return v; - } + `), fromFixture(stripIndent` declare class C { From 2194a124dbd95a6bb961c90bc75ea19959c96a6a Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 12:52:28 -0500 Subject: [PATCH 016/165] failing test case on method --- .../no-unnecessary-type-parameters.test.ts | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index a59f6358a2e1..bd5eec5606c8 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -229,6 +229,29 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { }, ], }, + { + code: ` + declare class C { + method(param: T): U; + prop:

() => P; + } + `, + errors: [ + // V is unused so it's already covered by no-unused-variables + { + data: { name: 'T' }, + messageId: 'sole', + }, + { + data: { name: 'U' }, + messageId: 'sole', + }, + { + data: { name: 'P' }, + messageId: 'sole', + }, + ], + }, ], /* }), @@ -248,13 +271,7 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `), fromFixture(stripIndent` - declare class C { - method(param: T): U; - ~ [canReplace { "name": "T", "replacement": "unknown" }] - ~ [cannotInfer { "name": "U" }] - prop: () => T; - ~ [cannotInfer { "name": "T" }] - } + `), fromFixture(stripIndent` const func = (param): T => null!; From 8ebf34ab36faded04034afe3f85fc410a7147e1e Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 13:14:33 -0500 Subject: [PATCH 017/165] Run on MethodDefinition --- .../eslint-plugin/src/rules/no-unnecessary-type-parameters.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index f848d3b1e6d4..a79eba40a7ec 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -36,6 +36,7 @@ export default createRule({ 'ArrowFunctionExpression[typeParameters]', 'FunctionDeclaration[typeParameters]', 'FunctionExpression[typeParameters]', + 'MethodDefinition', 'TSCallSignatureDeclaration[typeParameters]', 'TSConstructorType[typeParameters]', 'TSDeclareFunction[typeParameters]', From 1244a13bd6890af9e02b3b26dc3600f896691b9e Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 13:15:41 -0500 Subject: [PATCH 018/165] add TODO --- .../eslint-plugin/src/rules/no-unnecessary-type-parameters.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index a79eba40a7ec..bb3eaa8cbf12 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -36,6 +36,7 @@ export default createRule({ 'ArrowFunctionExpression[typeParameters]', 'FunctionDeclaration[typeParameters]', 'FunctionExpression[typeParameters]', + // TODO: this is overly-broad, but MethodDefinition[typeParameters] doesn't work. 'MethodDefinition', 'TSCallSignatureDeclaration[typeParameters]', 'TSConstructorType[typeParameters]', From 3be30d5fa224bbe6d77f302b81b76af54f4f0ad0 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 13:17:16 -0500 Subject: [PATCH 019/165] comment --- .../eslint-plugin/src/rules/no-unnecessary-type-parameters.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index bb3eaa8cbf12..ec2c0d327272 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -104,6 +104,8 @@ export default createRule({ }, }); +// Fill in a counter of the number of times each type parameter appears in +// the given type. function collectTypeParameterUsage( checker: ts.TypeChecker, rootType: ts.Type, From 438a645fbc3aec3a5cf754590fe80f8aa29dbe19 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 14:41:16 -0500 Subject: [PATCH 020/165] re-enable invalid eslint-plugin-etc test --- .../src/rules/no-unnecessary-type-parameters.ts | 3 +-- .../rules/no-unnecessary-type-parameters.test.ts | 16 ++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index ec2c0d327272..f194f8b94891 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -36,8 +36,7 @@ export default createRule({ 'ArrowFunctionExpression[typeParameters]', 'FunctionDeclaration[typeParameters]', 'FunctionExpression[typeParameters]', - // TODO: this is overly-broad, but MethodDefinition[typeParameters] doesn't work. - 'MethodDefinition', + 'MethodDefinition[value.typeParameters]', 'TSCallSignatureDeclaration[typeParameters]', 'TSConstructorType[typeParameters]', 'TSDeclareFunction[typeParameters]', diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index bd5eec5606c8..cde95ef940e8 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -17,7 +17,6 @@ const ruleTester = new RuleTester({ ruleTester.run('no-unnecessary-type-parameters', rule, { valid: [ { - // only: true, code: ` declare function get(): void; declare function get(param: T[]): T; @@ -33,14 +32,7 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { declare function compare(param1: T, param2: T): boolean; // this is valid because it enforces comparable types for both parameters `, }, - // Dan and Josh disagree with this; U only appears once, therefore it's invalid. - // { - // code: ` - // declare function compare(param1: T, param2: U): boolean; // this is also valid because T constrains U - // `, - // }, { - // only: true, code: ` function getProperty(obj: T, key: K) { return obj[key]; @@ -252,6 +244,14 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { }, ], }, + { + // This is considered valid by eslint-plugin-etc but Dan and Josh disagree; + // U only appears once, therefore it's invalid. + code: ` + declare function compare(param1: T, param2: U): boolean; // this is also valid because T constrains U + `, + errors: [{ messageId: 'sole' }], + }, ], /* }), From 7731a88116de8b9f46f84bfdae90d5742672eeb4 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 14:43:31 -0500 Subject: [PATCH 021/165] port one more --- .../rules/no-unnecessary-type-parameters.test.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index cde95ef940e8..05244c6a6729 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -252,13 +252,20 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `, errors: [{ messageId: 'sole' }], }, + { + code: ` + // The parameter type can be Record + declare function get(param: Record): boolean; + `, + errors: [ + { messageId: 'sole', data: { name: 'T' } }, + { messageId: 'sole', data: { name: 'U' } }, + ], + }, ], /* }), ` - - - declare function get(param: Record): boolean; ~~~~~~~~~~~~~~~~ [canReplace { "name": "T", "replacement": "string" }] ~ [canReplace { "name": "U", "replacement": "unknown" }] From fbe18a9c1d66d5a709322c53292be2066cfca99f Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 14:50:33 -0500 Subject: [PATCH 022/165] shadowing test case --- .../no-unnecessary-type-parameters.test.ts | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 05244c6a6729..868148dd1c91 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -253,8 +253,8 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { errors: [{ messageId: 'sole' }], }, { + // The parameter type can be Record code: ` - // The parameter type can be Record declare function get(param: Record): boolean; `, errors: [ @@ -262,24 +262,19 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { { messageId: 'sole', data: { name: 'U' } }, ], }, + { + // The outer T is shadowed by the inner T; this is not a valid use. + code: ` + declare function get(param: (param: T) => U): T; + `, + errors: [ + { messageId: 'sole', data: { name: 'T' } }, + { messageId: 'sole', data: { name: 'T' } }, + { messageId: 'sole', data: { name: 'U' } }, + ], + }, ], /* - }), - ` - declare function get(param: Record): boolean; - ~~~~~~~~~~~~~~~~ [canReplace { "name": "T", "replacement": "string" }] - ~ [canReplace { "name": "U", "replacement": "unknown" }] - declare function get(param: (param: T) => U): T; - ~ [cannotInfer { "name": "T" }] - ~ [canReplace { "name": "T", "replacement": "unknown" }] - ~ [cannotInfer { "name": "U" }] - `), - fromFixture(stripIndent` - - `), - fromFixture(stripIndent` - - `), fromFixture(stripIndent` const func = (param): T => null!; ~ [cannotInfer { "name": "T" }] From 81523abcabecd2210ca6b67956bcfdbd933792da Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 14:52:26 -0500 Subject: [PATCH 023/165] port one more test --- .../tests/rules/no-unnecessary-type-parameters.test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 868148dd1c91..69e9893aa8b5 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -273,12 +273,14 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { { messageId: 'sole', data: { name: 'U' } }, ], }, + { + code: ` + const func = (param: T) => null; + `, + errors: [{ messageId: 'sole' }], + }, ], /* - fromFixture(stripIndent` - const func = (param): T => null!; - ~ [cannotInfer { "name": "T" }] - `), // This test should fail, but it doesn't because the implementation tests // the signature with: // From b95883b329799dd6cb25ec87eca3074bd360e80f Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 15:04:17 -0500 Subject: [PATCH 024/165] port over DefinitelyTyped-tools tests; two failing --- .../no-unnecessary-type-parameters.test.ts | 97 ++++++++++++++++--- 1 file changed, 84 insertions(+), 13 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 69e9893aa8b5..217e299522d4 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -88,6 +88,28 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { // Same as above but with an explicit return type. declare function box(val: T): { val: T }; `, + // Tests from DefinitelyTyped-tools / eslint-plugin / no-unnecessary-generics + ` + declare function example1(a: string): string; + `, + ` + declare function example2(a: T): T; + `, + ` + declare function example3(a: T[]): T; + `, + ` + declare function example4(a: Set): T; + `, + ` + declare function example5(a: Set, b: T[]): void; + `, + ` + declare function example6(a: Map): void; + `, + ` + declare function example7(t: T, u: U): U; + `, // { // code: stripIndent` // // https://github.com/cartant/eslint-plugin-etc/issues/15 @@ -279,21 +301,70 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `, errors: [{ messageId: 'sole' }], }, + // Tests from DefinitelyTyped-tools / eslint-plugin / no-unnecessary-generics + // These aren't flagged as errors by this rule because it only runs over functions. + // { + // code: ` + // type Fn = () => T; + // type Ctr = new() => T; + // ` + // } + { + code: ` + const f1 = (): T => {}; + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + class C { + constructor(x: T) {} + } + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + function f2(): T {} + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + function f3(x: { T: number }): void; + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + function f4(u: U): U; + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + const f5 = function (): T {}; + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + interface I { + (value: T): void; + } + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + interface I { + m(x: T): void; + } + `, + errors: [{ messageId: 'sole' }], + }, ], /* - // This test should fail, but it doesn't because the implementation tests - // the signature with: - // - // tsutils.isFunctionWithBody(signature) - // - // And if that returns true, the implementation assumes that the type - // parameter is used. - // - // fromFixture(stripIndent` - // // https://github.com/cartant/eslint-plugin-etc/issues/30 - // const func = (param: T) => null; - // ~ [canReplace { "name": "T", "replacement": "unknown" }] - // `), fromFixture(stripIndent` declare function take(param: T): void; // T not used as constraint -> could just be any/unknown ~ [canReplace { "name": "T", "replacement": "unknown" }] From aa025a7a52ee4d60238ad6ff621949dabf424019 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 15:07:15 -0500 Subject: [PATCH 025/165] resolve one failure --- .../rules/no-unnecessary-type-parameters.test.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 217e299522d4..6b40fb969927 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -329,12 +329,11 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `, errors: [{ messageId: 'sole' }], }, - { - code: ` - function f3(x: { T: number }): void; - `, - errors: [{ messageId: 'sole' }], - }, + // The second "T" here is a property name, not a type. + // So T is completely unused and this should be caught by no-unused-variables. + // ` + // function f3(x: { T: number }): void; + // `, { code: ` function f4(u: U): U; From 318db40303c134145db43db6376b8883a41b2eed Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 15:08:47 -0500 Subject: [PATCH 026/165] resolve second failure --- .../rules/no-unnecessary-type-parameters.test.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 6b40fb969927..3fd0a53e066f 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -315,14 +315,12 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `, errors: [{ messageId: 'sole' }], }, - { - code: ` - class C { - constructor(x: T) {} - } - `, - errors: [{ messageId: 'sole' }], - }, + // This is an error: Type parameters cannot appear on a constructor declaration. + // ` + // class C { + // constructor(x: T) {} + // } + // `, { code: ` function f2(): T {} From 77bc70e2f7bcd6f75dd513092892fca4c119e3a5 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 15:10:19 -0500 Subject: [PATCH 027/165] enable two more tests --- .../no-unnecessary-type-parameters.test.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 3fd0a53e066f..9e38f58a5e74 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -302,13 +302,18 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { errors: [{ messageId: 'sole' }], }, // Tests from DefinitelyTyped-tools / eslint-plugin / no-unnecessary-generics - // These aren't flagged as errors by this rule because it only runs over functions. - // { - // code: ` - // type Fn = () => T; - // type Ctr = new() => T; - // ` - // } + { + code: ` + type Fn = () => T; + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + type Ctr = new () => T; + `, + errors: [{ messageId: 'sole' }], + }, { code: ` const f1 = (): T => {}; From 5f0b8497decd3a3ed0a93c4948815fcb1eccf165 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 15:27:12 -0500 Subject: [PATCH 028/165] one failing test from eslint-plugin-etc --- .../no-unnecessary-type-parameters.test.ts | 235 ++++++++---------- 1 file changed, 109 insertions(+), 126 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 9e38f58a5e74..00e8bd792c15 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -16,27 +16,29 @@ const ruleTester = new RuleTester({ ruleTester.run('no-unnecessary-type-parameters', rule, { valid: [ + // These tests are adapted from https://effectivetypescript.com/2020/08/12/generics-golden-rule/ { code: ` - declare function get(): void; - declare function get(param: T[]): T; + function getProperty(obj: T, key: K) { + return obj[key]; + } `, }, + // These tests are adapted from eslint-plugin-etc's no-misused-generics { code: ` - declare function identity(param: T): T; // this is valid as it constrains the return type to the parameter type + declare function get(): void; + declare function get(param: T[]): T; `, }, { code: ` - declare function compare(param1: T, param2: T): boolean; // this is valid because it enforces comparable types for both parameters + declare function identity(param: T): T; // this is valid as it constrains the return type to the parameter type `, }, { code: ` - function getProperty(obj: T, key: K) { - return obj[key]; - } + declare function compare(param1: T, param2: T): boolean; // this is valid because it enforces comparable types for both parameters `, }, { @@ -50,6 +52,17 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { } `, }, + + // Tests from DefinitelyTyped-tools / eslint-plugin / no-unnecessary-generics + 'declare function example1(a: string): string;', + 'declare function example2(a: T): T;', + 'declare function example3(a: T[]): T;', + 'declare function example4(a: Set): T;', + 'declare function example5(a: Set, b: T[]): void;', + 'declare function example6(a: Map): void;', + 'declare function example7(t: T, u: U): U;', + + // These tests are new for the no-unnecessary-type-parameters rule { code: ` // The inferred return type is Map, therefore this is valid. @@ -88,28 +101,7 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { // Same as above but with an explicit return type. declare function box(val: T): { val: T }; `, - // Tests from DefinitelyTyped-tools / eslint-plugin / no-unnecessary-generics - ` - declare function example1(a: string): string; - `, - ` - declare function example2(a: T): T; - `, - ` - declare function example3(a: T[]): T; - `, - ` - declare function example4(a: Set): T; - `, - ` - declare function example5(a: Set, b: T[]): void; - `, - ` - declare function example6(a: Map): void; - `, - ` - declare function example7(t: T, u: U): U; - `, + // { // code: stripIndent` // // https://github.com/cartant/eslint-plugin-etc/issues/15 @@ -133,101 +125,44 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { // }, ], invalid: [ + // These tests are adapted from https://effectivetypescript.com/2020/08/12/generics-golden-rule/ + { + code: ` + function printProperty(obj: T, key: K) { + console.log(obj[key]); + } + `, + errors: [{ messageId: 'sole', data: { name: 'K' } }], + }, + + // These tests are adapted from eslint-plugin-etc { code: ` declare function get(): T; - // ~ [cannotInfer { "name": "T" }] get(); `, - errors: [ - { - messageId: 'sole', - }, - ], + errors: [{ messageId: 'sole' }], }, { code: ` declare function get(): T; - // ~~~~~~~~~~~~~~~~ [cannotInfer { "name": "T" }] `, - errors: [ - { - messageId: 'sole', - }, - ], + errors: [{ messageId: 'sole' }], }, { code: ` declare function get(param: U): U; - // ~ [cannotInfer { "name": "T" }] `, - errors: [ - { - messageId: 'sole', - }, - ], + errors: [{ messageId: 'sole' }], }, { code: ` declare function get(param: T): U; - // ~~~~~~~~~~~~~~~ [cannotInfer { "name": "U" }] `, - errors: [ - { - messageId: 'sole', - }, - ], - }, - { - code: ` - function printProperty(obj: T, key: K) { - console.log(obj[key]); - } - `, - errors: [ - { - messageId: 'sole', - data: { name: 'K' }, - }, - ], - }, - { - code: ` - // The inferred return type is Map, but these are the sole uses - // of both type parameters, so this is invalid. - function makeMap() { - return new Map(); - } - `, - errors: [ - { - data: { name: 'K' }, - messageId: 'sole', - }, - { - data: { name: 'V' }, - messageId: 'sole', - }, - ], - }, - { - code: ` - // Same as the previous test, but with an explicit return type. - function makeMap(): Map { - return new Map(); - } - `, - errors: [ - { - data: { name: 'K' }, - messageId: 'sole', - }, - { - data: { name: 'V' }, - messageId: 'sole', - }, - ], + errors: [{ messageId: 'sole' }], }, + + // These tests are adapted from eslint-plugin-etc's no-misused-generics { code: ` // Inferred return type is T, but this is still the sole usage. @@ -252,18 +187,9 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `, errors: [ // V is unused so it's already covered by no-unused-variables - { - data: { name: 'T' }, - messageId: 'sole', - }, - { - data: { name: 'U' }, - messageId: 'sole', - }, - { - data: { name: 'P' }, - messageId: 'sole', - }, + { messageId: 'sole', data: { name: 'T' } }, + { messageId: 'sole', data: { name: 'U' } }, + { messageId: 'sole', data: { name: 'P' } }, ], }, { @@ -301,6 +227,46 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `, errors: [{ messageId: 'sole' }], }, + { + code: ` + declare function take(param: T): void; // T not used as constraint -> could just be any/unknown + // ~ [canReplace { "name": "T", "replacement": "unknown" }] + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + declare function take(param: T): void; // could just use object + // ~~~~~~~~~~~~~~~~ [canReplace { "name": "T", "replacement": "object" }] + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + declare function take(param1: T, param2: U): void; // no constraint + // ~ [canReplace { "name": "T", "replacement": "unknown" }] + // ~~~~~ [canReplace { "name": "U", "replacement": "unknown" }] + `, + errors: [ + { messageId: 'sole', data: { name: 'T' } }, + { messageId: 'sole', data: { name: 'U' } }, + ], + }, + { + code: ` + declare function take(param: T): U; // U is only used in the return type + // ~~~~~~~~~~~ [cannotInfer { "name": "U" }] + `, + errors: [{ messageId: 'sole', data: { name: 'U' } }], + }, + { + code: ` + declare function take(param: U): U; // T cannot be inferred + // ~ [cannotInfer { "name": "T" }] + `, + errors: [{ messageId: 'sole', data: { name: 'T' } }], + }, + // Tests from DefinitelyTyped-tools / eslint-plugin / no-unnecessary-generics { code: ` @@ -365,20 +331,37 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `, errors: [{ messageId: 'sole' }], }, + + // These tests are new for the no-unnecessary-type-parameters rule + { + code: ` + // The inferred return type is Map, but these are the sole uses + // of both type parameters, so this is invalid. + function makeMap() { + return new Map(); + } + `, + errors: [ + { messageId: 'sole', data: { name: 'K' } }, + { messageId: 'sole', data: { name: 'V' } }, + ], + }, + { + code: ` + // Same as the previous test, but with an explicit return type. + function makeMap(): Map { + return new Map(); + } + `, + errors: [ + { messageId: 'sole', data: { name: 'K' } }, + { messageId: 'sole', data: { name: 'V' } }, + ], + }, ], /* fromFixture(stripIndent` - declare function take(param: T): void; // T not used as constraint -> could just be any/unknown - ~ [canReplace { "name": "T", "replacement": "unknown" }] - declare function take(param: T): void; // could just use object - ~~~~~~~~~~~~~~~~ [canReplace { "name": "T", "replacement": "object" }] - declare function take(param1: T, param2: U): void; // no constraint - ~ [canReplace { "name": "T", "replacement": "unknown" }] - ~~~~~ [canReplace { "name": "U", "replacement": "unknown" }] - declare function take(param: T): U; // U is only used in the return type - ~~~~~~~~~~~ [cannotInfer { "name": "U" }] - declare function take(param: U): U; // T cannot be inferred - ~ [cannotInfer { "name": "T" }] + `), fromFixture(stripIndent` declare class Foo { From 89ba35c6caf81ae642a759045c1a034a8b16a7dc Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 15:28:34 -0500 Subject: [PATCH 029/165] one more failing test --- .../no-unnecessary-type-parameters.test.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 00e8bd792c15..8018c08af467 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -266,6 +266,24 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `, errors: [{ messageId: 'sole', data: { name: 'T' } }], }, + { + code: ` + declare class Foo { + prop: string; + getProp(this: Record<'prop', T>): T; + compare(this: Record<'prop', T>, other: Record<'prop', T>): number; + foo(this: T): void; + // ~ [canReplace { "name": "T", "replacement": "unknown" }] + } + `, + errors: [ + { + messageId: 'sole', + data: { name: 'T' }, + line: 5, + }, + ], + }, // Tests from DefinitelyTyped-tools / eslint-plugin / no-unnecessary-generics { From 40199a87b3ce6c366fef52ed27a3ac2c047768f1 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 16:25:16 -0500 Subject: [PATCH 030/165] full port of eslint-plugin-etc tests --- .../tests/rules/no-unnecessary-type-parameters.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 8018c08af467..6a55222c6aca 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -248,7 +248,8 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { // ~~~~~ [canReplace { "name": "U", "replacement": "unknown" }] `, errors: [ - { messageId: 'sole', data: { name: 'T' } }, + // eslint-plugin-etc flags both type parameters as uninferrable + // { messageId: 'sole', data: { name: 'T' } }, { messageId: 'sole', data: { name: 'U' } }, ], }, @@ -280,7 +281,7 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { { messageId: 'sole', data: { name: 'T' }, - line: 5, + line: 6, }, ], }, From c542524707f2ef5bd6a7beb3af3f28af7821f1ed Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 16:41:10 -0500 Subject: [PATCH 031/165] one failing test from ETS post --- .../no-unnecessary-type-parameters.test.ts | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 6a55222c6aca..df70c8941c42 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -17,6 +17,34 @@ const ruleTester = new RuleTester({ ruleTester.run('no-unnecessary-type-parameters', rule, { valid: [ // These tests are adapted from https://effectivetypescript.com/2020/08/12/generics-golden-rule/ + ` + function identity(arg: T): T { + return arg; + } + `, + ` + function printProperty(obj: T, key: keyof T) { + console.log(obj[key]); + } + `, + ` + class ClassyArray { + arr: T[]; + constructor(arr: T[]) { + this.arr = arr; + } + + get(): T[] { + return this.arr; + } + add(item: T) { + this.arr.push(item); + } + remove(item: T) { + this.arr = this.arr.filter(el => el !== item); + } + } + `, { code: ` function getProperty(obj: T, key: K) { @@ -126,6 +154,25 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { ], invalid: [ // These tests are adapted from https://effectivetypescript.com/2020/08/12/generics-golden-rule/ + { + code: ` + function third(a: A, b: B, c: C): C { + return c; + } + `, + errors: [ + { messageId: 'sole', data: { name: 'A' } }, + { messageId: 'sole', data: { name: 'B' } }, + ], + }, + { + code: ` + function parseYAML(input: string): T { + // ... + } + `, + errors: [{ messageId: 'sole' }], + }, { code: ` function printProperty(obj: T, key: K) { @@ -134,6 +181,37 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { `, errors: [{ messageId: 'sole', data: { name: 'K' } }], }, + { + code: ` + class Joiner { + join(els: T[]) { + return els.map(el => '' + el).join(','); + } + } + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + class Joiner { + join(els: T[]) { + return els.map(el => '' + el).join(','); + } + } + `, + errors: [{ messageId: 'sole' }], + }, + { + code: ` + interface Lengthy { + length: number; + } + function getLength(x: T) { + return x.length; + } + `, + errors: [{ messageId: 'sole' }], + }, // These tests are adapted from eslint-plugin-etc { From 74cddeb2df6f0d3a77da9551e8adb4169536892e Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 16:50:05 -0500 Subject: [PATCH 032/165] fix previous error, expose a new one with a test --- .../rules/no-unnecessary-type-parameters.ts | 4 +++- .../no-unnecessary-type-parameters.test.ts | 22 ++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index f194f8b94891..568cbe8c7400 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -34,14 +34,16 @@ export default createRule({ return { [[ 'ArrowFunctionExpression[typeParameters]', + 'ClassDeclaration[typeParameters]', 'FunctionDeclaration[typeParameters]', 'FunctionExpression[typeParameters]', - 'MethodDefinition[value.typeParameters]', + // 'MethodDefinition[value.typeParameters]', 'TSCallSignatureDeclaration[typeParameters]', 'TSConstructorType[typeParameters]', 'TSDeclareFunction[typeParameters]', 'TSFunctionType[typeParameters]', 'TSMethodSignature[typeParameters]', + 'TSEmptyBodyFunctionExpression[typeParameters]', ].join(', ')](esNode: ESTreeFunctionLikeWithTypeParameters): void { const tsNode = parserServices.esTreeNodeToTSNodeMap.get( esNode, diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index df70c8941c42..bde183d8f328 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -52,6 +52,7 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { } `, }, + // These tests are adapted from eslint-plugin-etc's no-misused-generics { code: ` @@ -91,9 +92,9 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { 'declare function example7(t: T, u: U): U;', // These tests are new for the no-unnecessary-type-parameters rule + // The inferred return type is Map, therefore this is valid. { code: ` - // The inferred return type is Map, therefore this is valid. function makeMap(ks: K[], vs: V[]) { const r = new Map(); ks.forEach((k, i) => { @@ -103,32 +104,41 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { } `, }, + // The inferred return type is [T, T][], which references T twice. ` - // The inferred return type is [T, T][], which references T twice. function arrayOfPairs() { return [] as [T, T][]; } `, + // Same as above but with an explicit return type. ` - // Same as above but with an explicit return type. declare function arrayOfPairs(): [T, T][]; `, + // T appears twice, once as a parameter type and once in the predicate. ` - // T appears twice, once as a parameter type and once in the predicate. function isNonNull(v: T): v is Exclude { return v !== null; } `, + // T appears in the inferred object return type, so this is OK. ` - // T appears in the inferred object return type, so this is OK. function box(val: T) { return { val }; } `, + // Same as above but with an explicit return type. ` - // Same as above but with an explicit return type. declare function box(val: T): { val: T }; `, + // The second use of the class type parameter is in a method's inferred return type. + ` + class Box { + val: T | null = null; + get() { + return this.val; + } + } + `, // { // code: stripIndent` From 8420f28d8b200638c623d2a026f603a9507fd986 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 17:02:10 -0500 Subject: [PATCH 033/165] resolve inferred return types on methods --- .../rules/no-unnecessary-type-parameters.ts | 55 ++++++++++--------- .../no-unnecessary-type-parameters.test.ts | 16 +++--- 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 568cbe8c7400..313ad5681289 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -6,14 +6,6 @@ import * as ts from 'typescript'; import { createRule, getParserServices } from '../util'; -type ESTreeFunctionLikeWithTypeParameters = TSESTree.FunctionLike & { - typeParameters: {}; -}; - -type TSSignatureDeclarationWithTypeParameters = ts.SignatureDeclaration & { - typeParameters: {}; -}; - export default createRule({ defaultOptions: [], meta: { @@ -33,21 +25,21 @@ export default createRule({ return { [[ - 'ArrowFunctionExpression[typeParameters]', 'ClassDeclaration[typeParameters]', + 'ClassExpression[typeParameters]', + 'ArrowFunctionExpression[typeParameters]', 'FunctionDeclaration[typeParameters]', 'FunctionExpression[typeParameters]', - // 'MethodDefinition[value.typeParameters]', 'TSCallSignatureDeclaration[typeParameters]', 'TSConstructorType[typeParameters]', 'TSDeclareFunction[typeParameters]', 'TSFunctionType[typeParameters]', 'TSMethodSignature[typeParameters]', 'TSEmptyBodyFunctionExpression[typeParameters]', - ].join(', ')](esNode: ESTreeFunctionLikeWithTypeParameters): void { - const tsNode = parserServices.esTreeNodeToTSNodeMap.get( - esNode, - ) as TSSignatureDeclarationWithTypeParameters; + ].join(', ')](esNode: TSESTree.FunctionLike): void { + const tsNode = parserServices.esTreeNodeToTSNodeMap.get(esNode) as + | ts.SignatureDeclaration + | ts.ClassLikeDeclaration; if (!tsNode.typeParameters) { return; } @@ -57,18 +49,31 @@ export default createRule({ // XXX this collects a lot more usage than is needed for this rule. usage ??= tsutils.collectVariableUsage(tsNode.getSourceFile()); + // We need to resolve and analyze the inferred return type of a function + // to see whether it contains additional references to the type parameters. + // For classes, we need to do this for all their methods. let inferredCounts: Map | null = null; - if (!tsNode.type) { - // We need to resolve and analyze the inferred return type to see - // whether it contains additional references to the type parameters. - inferredCounts = new Map(); - const type = checker.getTypeAtLocation(tsNode); - for (const sig of type.getCallSignatures()) { - collectTypeParameterUsage( - checker, - sig.getReturnType(), - inferredCounts, - ); + const fnNodes = []; + if (ts.isFunctionLike(tsNode)) { + fnNodes.push(tsNode); + } else if (ts.isClassLike(tsNode)) { + for (const member of tsNode.members) { + if (ts.isFunctionLike(member)) { + fnNodes.push(member); + } + } + } + for (const fnNode of fnNodes) { + if (!fnNode.type) { + inferredCounts ??= new Map(); + const type = checker.getTypeAtLocation(fnNode); + for (const sig of type.getCallSignatures()) { + collectTypeParameterUsage( + checker, + sig.getReturnType(), + inferredCounts, + ); + } } } diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index bde183d8f328..cdad68614aa9 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -131,14 +131,16 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { declare function box(val: T): { val: T }; `, // The second use of the class type parameter is in a method's inferred return type. - ` - class Box { - val: T | null = null; - get() { - return this.val; + { + code: ` + class Box { + val: T | null = null; + get() { + return this.val; + } } - } - `, + `, + }, // { // code: stripIndent` From a54b494a3370e63cde0a9cd85a8b105f93573852 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 17:09:28 -0500 Subject: [PATCH 034/165] add both() function to test cases --- .../no-unnecessary-type-parameters.test.ts | 91 +++++++++---------- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index cdad68614aa9..f19349cc85fb 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -131,39 +131,27 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { declare function box(val: T): { val: T }; `, // The second use of the class type parameter is in a method's inferred return type. - { - code: ` - class Box { - val: T | null = null; - get() { - return this.val; - } + ` + class Box { + val: T | null = null; + get() { + return this.val; } - `, - }, - - // { - // code: stripIndent` - // // https://github.com/cartant/eslint-plugin-etc/issues/15 - // /** - // * Call two functions with the same args, e.g. - // * - // * onClick={both(action('click'), setState)} - // */ - // export function both< - // Args extends unknown[], - // CB1 extends (...args: Args) => void, - // CB2 extends (...args: Args) => void - // >(fn1: CB1, fn2: CB2): (...args: Args) => void { - // // See https://stackoverflow.com/a/62093430/388951 - // return function (...args: Args) { - // fn1(...args); - // fn2(...args); - // }; - // } - // `, - // }, + } + `, + ` + export function both( + fn1: (...args: Args) => void, + fn2: (...args: Args) => void, + ): (...args: Args) => void { + return function (...args: Args) { + fn1(...args); + fn2(...args); + }; + } + `, ], + invalid: [ // These tests are adapted from https://effectivetypescript.com/2020/08/12/generics-golden-rule/ { @@ -375,6 +363,32 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { }, ], }, + { + // See https://github.com/cartant/eslint-plugin-etc/issues/15 + // and https://stackoverflow.com/a/62093430/388951 + // See above for a fixed version. + code: ` + /** + * Call two functions with the same args, e.g. + * + * onClick={both(action('click'), setState)} + */ + export function both< + Args extends unknown[], + CB1 extends (...args: Args) => void, + CB2 extends (...args: Args) => void, + >(fn1: CB1, fn2: CB2): (...args: Args) => void { + return function (...args: Args) { + fn1(...args); + fn2(...args); + }; + } + `, + errors: [ + { messageId: 'sole', data: { name: 'CB1' } }, + { messageId: 'sole', data: { name: 'CB2' } }, + ], + }, // Tests from DefinitelyTyped-tools / eslint-plugin / no-unnecessary-generics { @@ -468,19 +482,4 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { ], }, ], - /* - fromFixture(stripIndent` - - `), - fromFixture(stripIndent` - declare class Foo { - prop: string; - getProp(this: Record<'prop', T>): T; - compare(this: Record<'prop', T>, other: Record<'prop', T>): number; - foo(this: T): void; - ~ [canReplace { "name": "T", "replacement": "unknown" }] - } - `), - ], - */ }); From 88dc28f64fc3ae2906ae0be0f49ec75d739fb5b1 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 17:11:50 -0500 Subject: [PATCH 035/165] enable eslint rule, cleanup --- .../src/rules/no-unnecessary-type-parameters.ts | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 313ad5681289..c1a7c3e5b73a 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -1,6 +1,4 @@ -/* eslint-disable */ import type { TSESTree } from '@typescript-eslint/utils'; -import { analyze } from '@typescript-eslint/scope-manager'; import * as tsutils from 'ts-api-utils'; import * as ts from 'typescript'; @@ -122,10 +120,8 @@ function collectTypeParameterUsage( }; const process = (type: ts.Type): void => { - // console.log('process', checker.typeToString(type)); if (tsutils.isTypeParameter(type)) { for (const decl of type.getSymbol()?.getDeclarations() ?? []) { - // console.log(' got a type parameter!'); increment((decl as ts.TypeParameterDeclaration).name); break; } @@ -134,6 +130,7 @@ function collectTypeParameterUsage( if (tsutils.isUnionOrIntersectionType(type)) { type.types.forEach(process); } else if (tsutils.isIndexedAccessType(type)) { + // This covers index access types like "T[K]" process(type.objectType); process(type.indexType); } else if (tsutils.isTypeReference(type)) { @@ -149,16 +146,7 @@ function collectTypeParameterUsage( process(checker.getTypeOfSymbol(sym)); } } - // If it's specifically a type parameter, then add it and we're done. - // Compound types: - // + union/intersection types - // + array/tuple types - // - object types - // - mapped types - // + types with generic type parameters - // - type predicate - // + indexed access types - // - conditional types + // TODO: mapped types, type predicate, conditional types, function types }; process(rootType); From 983a4bc9aba31669c830814af8b29ede91ea2121 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 2 Jan 2024 17:39:49 -0500 Subject: [PATCH 036/165] cleanup, add docs --- .../rules/no-unnecessary-type-parameters.md | 104 ++++++++++++++++++ .../rules/no-unnecessary-type-parameters.ts | 55 ++++----- .../no-unnecessary-type-parameters.test.ts | 2 +- 3 files changed, 135 insertions(+), 26 deletions(-) create mode 100644 packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md new file mode 100644 index 000000000000..af90addb1d16 --- /dev/null +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md @@ -0,0 +1,104 @@ +--- +description: 'Disallow type parameters that only appear once.' +--- + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unnecessary-type-parameters** for documentation. + +This rule forbids type parameters that only appear once in a function, method or class definition. + +Type parameters relate two types. If a generic type parameter only appears once, then it is not relating anything. It can usually be replaced with explicit types such as `unknown`. + +At best unnecessary type parameters make code harder to read. At worst they can be used to disguise unsafe type assertions. + +## Options + +None. + +## Examples + + + +### ❌ Incorrect + +```ts +function third(a: A, b: B, c: C): C { + return c; +} + +function parseYAML(input: string): T { + // ... +} + +function printProperty(obj: T, key: K) { + console.log(obj[key]); +} + +class Joiner { + join(els: T[]) { + return els.map(el => '' + el).join(','); + } +} +``` + +### ✅ Correct + +```ts +function third(a: unknown, b: unknown, c: C): C { + return c; +} + +function parseYAML(input: string): unknown { + // ... +} + +function printProperty(obj: T, key: keyof T) { + console.log(obj[key]); +} + +class Joiner { + join(els: (string | number)[]) { + return els.map(el => '' + el).join(','); + } +} + +// T appears twice: in the type of arg and as the return type +function identity(arg: T): T { + return arg; +} + +// T appears twice: "keyof T" and in the inferred return type (T[K]). +// K appears twice: "key: K" and in the inferred return type (T[K]). +function getProperty(obj: T, key: K) { + return obj[key]; +} +``` + +## When Not To Use It + +This rule will prevent using type parameters to test types, for example: + +```ts +function assertType(arg: T) {} + +assertType(123); +assertType('abc'); +// ~~~~~ +// Argument of type 'string' is not assignable to parameter of type 'number'. +``` + +If you're using this pattern then you'll want to disable this rule. + +If you're using generic type parameters to implement phantom types then you'll also run afoul of this rule. + +## Further Reading + +- TypeScript handbook: [Type Parameters Should Appear Twice](https://microsoft.github.io/TypeScript-New-Handbook/everything/#type-parameters-should-appear-twice) +- Effective TypeScript: [The Golden Rule of Generics](https://effectivetypescript.com/2020/08/12/generics-golden-rule/) + +## Related To + +- eslint-plugin-etc's [`no-misused-generics`](https://github.com/cartant/eslint-plugin-etc/blob/main/docs/rules/no-misused-generics.md) +- wotan's [`no-misused-generics`](https://github.com/fimbullinter/wotan/blob/master/packages/mimir/docs/no-misused-generics.md) +- DefinitelyTyped-tools' [`no-unnecessary-generics`](https://github.com/microsoft/DefinitelyTyped-tools/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-generics.md) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index c1a7c3e5b73a..6cbdcc42e8cc 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -16,7 +16,7 @@ export default createRule({ schema: [], type: 'problem', }, - name: 'no-unnecessary-generics', + name: 'no-unnecessary-type-parameters', create(context) { const parserServices = getParserServices(context); let usage: Map | undefined; @@ -50,30 +50,7 @@ export default createRule({ // We need to resolve and analyze the inferred return type of a function // to see whether it contains additional references to the type parameters. // For classes, we need to do this for all their methods. - let inferredCounts: Map | null = null; - const fnNodes = []; - if (ts.isFunctionLike(tsNode)) { - fnNodes.push(tsNode); - } else if (ts.isClassLike(tsNode)) { - for (const member of tsNode.members) { - if (ts.isFunctionLike(member)) { - fnNodes.push(member); - } - } - } - for (const fnNode of fnNodes) { - if (!fnNode.type) { - inferredCounts ??= new Map(); - const type = checker.getTypeAtLocation(fnNode); - for (const sig of type.getCallSignatures()) { - collectTypeParameterUsage( - checker, - sig.getReturnType(), - inferredCounts, - ); - } - } - } + const inferredCounts = countInferredTypeParameterUsage(checker, tsNode); // References to the type parameter in the function body are irrelevant // for a valid type signature. @@ -151,3 +128,31 @@ function collectTypeParameterUsage( process(rootType); } + +/** Count uses of type parameters in inferred return types. */ +function countInferredTypeParameterUsage( + checker: ts.TypeChecker, + tsNode: ts.SignatureDeclaration | ts.ClassLikeDeclaration, +): Map | null { + let inferredCounts: Map | null = null; + const fnNodes = []; + if (ts.isFunctionLike(tsNode)) { + fnNodes.push(tsNode); + } else if (ts.isClassLike(tsNode)) { + for (const member of tsNode.members) { + if (ts.isFunctionLike(member)) { + fnNodes.push(member); + } + } + } + for (const fnNode of fnNodes) { + if (!fnNode.type) { + inferredCounts ??= new Map(); + const type = checker.getTypeAtLocation(fnNode); + for (const sig of type.getCallSignatures()) { + collectTypeParameterUsage(checker, sig.getReturnType(), inferredCounts); + } + } + } + return inferredCounts; +} diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index f19349cc85fb..124ff465b6ca 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -326,7 +326,7 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { // ~~~~~ [canReplace { "name": "U", "replacement": "unknown" }] `, errors: [ - // eslint-plugin-etc flags both type parameters as uninferrable + // eslint-plugin-etc flags both type parameters but we only flag one. // { messageId: 'sole', data: { name: 'T' } }, { messageId: 'sole', data: { name: 'U' } }, ], From 0555244e85ef9b4a92391119223f1368e921bf7c Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Wed, 3 Jan 2024 09:05:23 -0500 Subject: [PATCH 037/165] add to rules list --- packages/eslint-plugin/src/rules/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index 14c171af990e..b6bb67cf7136 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -80,6 +80,7 @@ import noUnnecessaryQualifier from './no-unnecessary-qualifier'; import noUnnecessaryTypeArguments from './no-unnecessary-type-arguments'; import noUnnecessaryTypeAssertion from './no-unnecessary-type-assertion'; import noUnnecessaryTypeConstraint from './no-unnecessary-type-constraint'; +import noUnnecessaryTypeParameters from './no-unnecessary-type-parameters'; import noUnsafeArgument from './no-unsafe-argument'; import noUnsafeAssignment from './no-unsafe-assignment'; import noUnsafeCall from './no-unsafe-call'; @@ -219,6 +220,7 @@ export default { 'no-unnecessary-type-arguments': noUnnecessaryTypeArguments, 'no-unnecessary-type-assertion': noUnnecessaryTypeAssertion, 'no-unnecessary-type-constraint': noUnnecessaryTypeConstraint, + 'no-unnecessary-type-parameters': noUnnecessaryTypeParameters, 'no-unsafe-argument': noUnsafeArgument, 'no-unsafe-assignment': noUnsafeAssignment, 'no-unsafe-call': noUnsafeCall, From 3862291e3e6bca71a12d17ff7f8a09c9a327eb03 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Wed, 3 Jan 2024 10:05:36 -0500 Subject: [PATCH 038/165] generate configs --- packages/eslint-plugin/src/configs/all.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index 9881e3397de2..4f1c1b5bef15 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -93,6 +93,7 @@ export = { '@typescript-eslint/no-unnecessary-type-arguments': 'error', '@typescript-eslint/no-unnecessary-type-assertion': 'error', '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unnecessary-type-parameters': 'error', '@typescript-eslint/no-unsafe-argument': 'error', '@typescript-eslint/no-unsafe-assignment': 'error', '@typescript-eslint/no-unsafe-call': 'error', From 7499dc7838c5d3cf57c2c23a568960a0d3de0726 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Wed, 3 Jan 2024 10:08:45 -0500 Subject: [PATCH 039/165] update tests, docs --- .../docs/rules/no-unnecessary-type-parameters.md | 2 +- .../src/rules/no-unnecessary-type-parameters.ts | 3 ++- .../no-unnecessary-type-parameters.shot | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 packages/eslint-plugin/tests/schema-snapshots/no-unnecessary-type-parameters.shot diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md index af90addb1d16..8ec3f11b831f 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md @@ -1,5 +1,5 @@ --- -description: 'Disallow type parameters that only appear once.' +description: 'Disallow type parameters that only appear once' --- > 🛑 This file is source code, not the primary documentation location! 🛑 diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts index 6cbdcc42e8cc..56dbf15b241b 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-parameters.ts @@ -8,7 +8,8 @@ export default createRule({ defaultOptions: [], meta: { docs: { - description: 'Disallow signatures using a generic parameter only once', + description: 'Disallow type parameters that only appear once', + requiresTypeChecking: true, }, messages: { sole: 'Type parameter {{name}} is used only once.', diff --git a/packages/eslint-plugin/tests/schema-snapshots/no-unnecessary-type-parameters.shot b/packages/eslint-plugin/tests/schema-snapshots/no-unnecessary-type-parameters.shot new file mode 100644 index 000000000000..a1e7d6b72117 --- /dev/null +++ b/packages/eslint-plugin/tests/schema-snapshots/no-unnecessary-type-parameters.shot @@ -0,0 +1,14 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Rule schemas should be convertible to TS types for documentation purposes no-unnecessary-type-parameters 1`] = ` +" +# SCHEMA: + +[] + + +# TYPES: + +/** No options declared */ +type Options = [];" +`; From d914f7ff8ea9027207d6ecba6474166c2a5c7faf Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Sun, 4 Feb 2024 16:05:53 -0500 Subject: [PATCH 040/165] Update packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Josh Goldberg ✨ --- .../eslint-plugin/docs/rules/no-unnecessary-type-parameters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md index 8ec3f11b831f..145ed22e83c5 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-parameters.md @@ -6,7 +6,7 @@ description: 'Disallow type parameters that only appear once' > > See **https://typescript-eslint.io/rules/no-unnecessary-type-parameters** for documentation. -This rule forbids type parameters that only appear once in a function, method or class definition. +This rule forbids type parameters that only appear once in a function, method, or class definition. Type parameters relate two types. If a generic type parameter only appears once, then it is not relating anything. It can usually be replaced with explicit types such as `unknown`. From a1a97b82d9f2ae5cc37639c80152d7a868bfd184 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Sun, 4 Feb 2024 16:20:11 -0500 Subject: [PATCH 041/165] Update packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Josh Goldberg ✨ --- .../tests/rules/no-unnecessary-type-parameters.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts index 124ff465b6ca..0c1bf4fb4361 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-parameters.test.ts @@ -471,7 +471,6 @@ ruleTester.run('no-unnecessary-type-parameters', rule, { }, { code: ` - // Same as the previous test, but with an explicit return type. function makeMap(): Map { return new Map(); } From b03a80c1d9a5324b3141738d9c6ce745252a92f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Sun, 7 Jan 2024 11:11:56 -0500 Subject: [PATCH 042/165] fix(utils): improve error message on typed rule with invalid parser (#8146) * feat(utils): throw error on typed rule with invalid parser * Switch to more informative error message * fix tests --- .../src/eslint-utils/getParserServices.ts | 21 +++- .../parserPathSeemsToBeTSESLint.ts | 3 + .../eslint-utils/getParserServices.test.ts | 107 ++++++++++++++++++ .../parserPathSeemsToBeTSESLint.test.ts | 24 ++++ 4 files changed, 152 insertions(+), 3 deletions(-) create mode 100644 packages/utils/src/eslint-utils/parserPathSeemsToBeTSESLint.ts create mode 100644 packages/utils/tests/eslint-utils/getParserServices.test.ts create mode 100644 packages/utils/tests/eslint-utils/parserPathSeemsToBeTSESLint.test.ts diff --git a/packages/utils/src/eslint-utils/getParserServices.ts b/packages/utils/src/eslint-utils/getParserServices.ts index 485860036c63..30f16a8613d7 100644 --- a/packages/utils/src/eslint-utils/getParserServices.ts +++ b/packages/utils/src/eslint-utils/getParserServices.ts @@ -3,10 +3,14 @@ import type { ParserServices, ParserServicesWithTypeInformation, } from '../ts-estree'; +import { parserPathSeemsToBeTSESLint } from './parserPathSeemsToBeTSESLint'; -const ERROR_MESSAGE = +const ERROR_MESSAGE_REQUIRES_PARSER_SERVICES = 'You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.'; +const ERROR_MESSAGE_UNKNOWN_PARSER = + 'Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward "parserOptions.project" to @typescript-eslint/parser.'; + /* eslint-disable @typescript-eslint/unified-signatures */ /** * Try to retrieve type-aware parser service from context. @@ -72,7 +76,7 @@ function getParserServices( // eslint-disable-next-line deprecation/deprecation, @typescript-eslint/no-unnecessary-condition -- TODO - support for ESLint v9 with backwards-compatible support for ESLint v8 context.parserServices.tsNodeToESTreeNodeMap == null ) { - throw new Error(ERROR_MESSAGE); + throwError(context.parserPath); } // if a rule requires full type information, then hard fail if it doesn't exist @@ -82,7 +86,7 @@ function getParserServices( context.parserServices.program == null && !allowWithoutFullTypeInformation ) { - throw new Error(ERROR_MESSAGE); + throwError(context.parserPath); } // eslint-disable-next-line deprecation/deprecation -- TODO - support for ESLint v9 with backwards-compatible support for ESLint v8 @@ -90,4 +94,15 @@ function getParserServices( } /* eslint-enable @typescript-eslint/unified-signatures */ +function throwError(parserPath: string): never { + throw new Error( + parserPathSeemsToBeTSESLint(parserPath) + ? ERROR_MESSAGE_REQUIRES_PARSER_SERVICES + : [ + ERROR_MESSAGE_REQUIRES_PARSER_SERVICES, + ERROR_MESSAGE_UNKNOWN_PARSER, + ].join('\n'), + ); +} + export { getParserServices }; diff --git a/packages/utils/src/eslint-utils/parserPathSeemsToBeTSESLint.ts b/packages/utils/src/eslint-utils/parserPathSeemsToBeTSESLint.ts new file mode 100644 index 000000000000..ab68b4367ab7 --- /dev/null +++ b/packages/utils/src/eslint-utils/parserPathSeemsToBeTSESLint.ts @@ -0,0 +1,3 @@ +export function parserPathSeemsToBeTSESLint(parserPath: string): boolean { + return /(?:typescript-eslint|\.\.)[\w/\\]*parser/.test(parserPath); +} diff --git a/packages/utils/tests/eslint-utils/getParserServices.test.ts b/packages/utils/tests/eslint-utils/getParserServices.test.ts new file mode 100644 index 000000000000..4fd4ed3cbff2 --- /dev/null +++ b/packages/utils/tests/eslint-utils/getParserServices.test.ts @@ -0,0 +1,107 @@ +/* eslint-disable @typescript-eslint/no-explicit-any, deprecation/deprecation -- wild and wacky testing */ +import type * as ts from 'typescript'; + +import type { ParserServices, TSESLint, TSESTree } from '../../src'; +import { ESLintUtils } from '../../src'; + +type UnknownRuleContext = Readonly>; + +const defaults = { + parserPath: '@typescript-eslint/parser/dist/index.js', + parserServices: { + esTreeNodeToTSNodeMap: new Map(), + program: {}, + tsNodeToESTreeNodeMap: new Map(), + } as unknown as ParserServices, +}; + +const createMockRuleContext = ( + overrides: Partial = {}, +): UnknownRuleContext => + ({ + ...defaults, + ...overrides, + }) as unknown as UnknownRuleContext; + +describe('getParserServices', () => { + it('throws a standard error when parserOptions.esTreeNodeToTSNodeMap is missing and the parser is known', () => { + const context = createMockRuleContext({ + parserServices: { + ...defaults.parserServices, + esTreeNodeToTSNodeMap: undefined as any, + }, + }); + + expect(() => ESLintUtils.getParserServices(context)).toThrow( + new Error( + 'You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.', + ), + ); + }); + + it('throws an augment error when parserOptions.esTreeNodeToTSNodeMap is missing and the parser is unknown', () => { + const context = createMockRuleContext({ + parserPath: '@babel/parser.js', + parserServices: { + ...defaults.parserServices, + esTreeNodeToTSNodeMap: undefined as any, + }, + }); + + expect(() => ESLintUtils.getParserServices(context)).toThrow( + new Error( + 'You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.\n' + + 'Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward "parserOptions.project" to @typescript-eslint/parser.', + ), + ); + }); + + it('throws an error when parserOptions.tsNodeToESTreeNodeMap is missing', () => { + const context = createMockRuleContext({ + parserServices: { + ...defaults.parserServices, + tsNodeToESTreeNodeMap: undefined as any, + }, + }); + + expect(() => ESLintUtils.getParserServices(context)).toThrow( + new Error( + 'You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.', + ), + ); + }); + + it('throws an error when parserServices.program is missing and allowWithoutFullTypeInformation is false', () => { + const context = createMockRuleContext({ + parserServices: { + ...defaults.parserServices, + program: undefined as any, + }, + }); + + expect(() => ESLintUtils.getParserServices(context)).toThrow( + new Error( + 'You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.', + ), + ); + }); + + it('returns when parserServices.program is missing and allowWithoutFullTypeInformation is true', () => { + const context = createMockRuleContext({ + parserServices: { + ...defaults.parserServices, + program: undefined as any, + }, + }); + + expect(ESLintUtils.getParserServices(context, true)).toBe( + context.parserServices, + ); + }); + + it('returns when parserServices is filled out', () => { + const context = createMockRuleContext(); + + expect(ESLintUtils.getParserServices(context)).toBe(context.parserServices); + }); +}); diff --git a/packages/utils/tests/eslint-utils/parserPathSeemsToBeTSESLint.test.ts b/packages/utils/tests/eslint-utils/parserPathSeemsToBeTSESLint.test.ts new file mode 100644 index 000000000000..0c11c1664005 --- /dev/null +++ b/packages/utils/tests/eslint-utils/parserPathSeemsToBeTSESLint.test.ts @@ -0,0 +1,24 @@ +import { parserPathSeemsToBeTSESLint } from '../../src/eslint-utils/parserPathSeemsToBeTSESLint'; + +describe('parserPathSeemsToBeTSESLint', () => { + test.each([ + ['local.js', false], + ['../other.js', false], + ['@babel/eslint-parser/lib/index.cjs', false], + ['@babel\\eslint-parser\\lib\\index.cjs', false], + ['node_modules/@babel/eslint-parser/lib/index.cjs', false], + ['../parser/dist/index.js', true], + ['../@typescript-eslint/parser/dist/index.js', true], + ['@typescript-eslint/parser/dist/index.js', true], + ['@typescript-eslint\\parser\\dist\\index.js', true], + ['node_modules/@typescript-eslint/parser/dist/index.js', true], + ['/path/to/typescript-eslint/parser/dist/index.js', true], + ['/path/to/typescript-eslint/parser/index.js', true], + ['/path/to/typescript-eslint/packages/parser/dist/index.js', true], + ['/path/to/typescript-eslint/packages/parser/index.js', true], + ['/path/to/@typescript-eslint/packages/parser/dist/index.js', true], + ['/path/to/@typescript-eslint/packages/parser/index.js', true], + ])('%s', (parserPath, expected) => { + expect(parserPathSeemsToBeTSESLint(parserPath)).toBe(expected); + }); +}); From 9815ac03075a78ee91e94d886dec3759eb294f0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Sun, 7 Jan 2024 11:24:20 -0500 Subject: [PATCH 043/165] chore: enable no-dynamic-delete internally (#7954) --- .eslintrc.js | 1 - packages/rule-tester/src/RuleTester.ts | 1 + packages/typescript-estree/tools/test-utils.ts | 2 ++ packages/website/src/components/config/ConfigEditor.tsx | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 400ed10c4aaa..edbd04cf0a89 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -53,7 +53,6 @@ module.exports = { 'deprecation/deprecation': 'error', // TODO(#7338): Investigate enabling these soon ✨ - '@typescript-eslint/no-dynamic-delete': 'off', '@typescript-eslint/prefer-nullish-coalescing': 'off', // TODO(#7130): Investigate changing these in or removing these from presets diff --git a/packages/rule-tester/src/RuleTester.ts b/packages/rule-tester/src/RuleTester.ts index ad28d93a1478..ba482063d7c0 100644 --- a/packages/rule-tester/src/RuleTester.ts +++ b/packages/rule-tester/src/RuleTester.ts @@ -468,6 +468,7 @@ export class RuleTester extends TestFramework { const itemConfig: Record = { ...item }; for (const parameter of RULE_TESTER_PARAMETERS) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete itemConfig[parameter]; } diff --git a/packages/typescript-estree/tools/test-utils.ts b/packages/typescript-estree/tools/test-utils.ts index 3d83fe26e9e8..8c3ab3aae0f7 100644 --- a/packages/typescript-estree/tools/test-utils.ts +++ b/packages/typescript-estree/tools/test-utils.ts @@ -127,6 +127,8 @@ export function omitDeep( for (const prop in node) { if (Object.prototype.hasOwnProperty.call(node, prop)) { if (shouldOmit(prop, node[prop]) || node[prop] === undefined) { + // Filter out omitted and undefined props from the node + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete node[prop]; continue; } diff --git a/packages/website/src/components/config/ConfigEditor.tsx b/packages/website/src/components/config/ConfigEditor.tsx index a326a5be2077..42ac48a6e77d 100644 --- a/packages/website/src/components/config/ConfigEditor.tsx +++ b/packages/website/src/components/config/ConfigEditor.tsx @@ -102,6 +102,8 @@ function ConfigEditor({ (name: string, value: unknown): void => { const newConfig = { ...values }; if (value === '' || value == null) { + // Filter out falsy values from the new config + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete newConfig[name]; } else { newConfig[name] = value; From bc63572bdd940c9abf0414d814d13e79d1c92b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Sun, 7 Jan 2024 11:35:16 -0500 Subject: [PATCH 044/165] chore: rename release.ts to release.mts (#8204) * chore: rename release.ts to release.mts * Update tsconfig.eslint.json Co-authored-by: auvred <61150013+auvred@users.noreply.github.com> --------- Co-authored-by: auvred <61150013+auvred@users.noreply.github.com> --- package.json | 2 +- tools/release/release.mts | 67 +++++++++++++++++++++++++++++++++ tools/release/release.ts | 79 --------------------------------------- tsconfig.eslint.json | 1 + 4 files changed, 69 insertions(+), 80 deletions(-) create mode 100644 tools/release/release.mts delete mode 100644 tools/release/release.ts diff --git a/package.json b/package.json index 03d6576a27f6..e1f231c13a54 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "lint": "npx nx run-many --target=lint --parallel", "postinstall": "npx nx run repo-tools:postinstall-script", "pre-commit": "yarn lint-staged", - "release": "tsx tools/release/release.ts", + "release": "tsx tools/release/release.mts", "start": "npx nx run website:start", "test": "npx nx run-many --target=test --parallel --exclude integration-tests --exclude website --exclude website-eslint", "test-integration": "npx nx run integration-tests:test", diff --git a/tools/release/release.mts b/tools/release/release.mts new file mode 100644 index 000000000000..d8306324325c --- /dev/null +++ b/tools/release/release.mts @@ -0,0 +1,67 @@ +import { execaSync } from 'execa'; +import { + releaseChangelog, + releasePublish, + releaseVersion, +} from 'nx/src/command-line/release'; +import yargs from 'yargs'; + +const options = await yargs + .version(false) + .option('version', { + description: + 'Explicit version specifier to use, if overriding conventional commits', + type: 'string', + }) + .option('dryRun', { + alias: 'd', + description: + 'Whether to perform a dry-run of the release process, defaults to true', + type: 'boolean', + default: true, + }) + .option('verbose', { + description: 'Whether or not to enable verbose logging, defaults to false', + type: 'boolean', + default: false, + }) + .parseAsync(); + +const { workspaceVersion, projectsVersionData } = await releaseVersion({ + specifier: options.version, + // stage package.json updates to be committed later by the changelog command + stageChanges: true, + dryRun: options.dryRun, + verbose: options.verbose, +}); + +// Update the lock file after the version bumps and stage it ready to be committed by the changelog step +if (!options.dryRun) { + console.log('⏳ Updating yarn.lock...'); + execaSync(`yarn`, [`install`], { + env: { ...process.env, SKIP_POSTINSTALL: 'true' }, + }); + execaSync(`git`, [`add`, `yarn.lock`]); + console.log('✅ Updated and staged yarn.lock\n'); +} + +// This will create a release on GitHub +await releaseChangelog({ + versionData: projectsVersionData, + version: workspaceVersion, + dryRun: options.dryRun, + verbose: options.verbose, +}); + +// An explicit null value here means that no changes were detected across any package +// eslint-disable-next-line eqeqeq +if (workspaceVersion === null) { + console.log( + '⏭️ No changes detected across any package, skipping publish step altogether', + ); +} else { + await releasePublish({ + dryRun: options.dryRun, + verbose: options.verbose, + }); +} diff --git a/tools/release/release.ts b/tools/release/release.ts deleted file mode 100644 index 74341bb2dfe3..000000000000 --- a/tools/release/release.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { execaSync } from 'execa'; -import { - releaseChangelog, - releasePublish, - releaseVersion, -} from 'nx/src/command-line/release'; -import yargs from 'yargs'; - -void (async () => { - try { - const options = await yargs - .version(false) - .option('version', { - description: - 'Explicit version specifier to use, if overriding conventional commits', - type: 'string', - }) - .option('dryRun', { - alias: 'd', - description: - 'Whether to perform a dry-run of the release process, defaults to true', - type: 'boolean', - default: true, - }) - .option('verbose', { - description: - 'Whether or not to enable verbose logging, defaults to false', - type: 'boolean', - default: false, - }) - .parseAsync(); - - const { workspaceVersion, projectsVersionData } = await releaseVersion({ - specifier: options.version, - // stage package.json updates to be committed later by the changelog command - stageChanges: true, - dryRun: options.dryRun, - verbose: options.verbose, - }); - - // Update the lock file after the version bumps and stage it ready to be committed by the changelog step - if (!options.dryRun) { - console.log('⏳ Updating yarn.lock...'); - execaSync(`yarn`, [`install`], { - env: { ...process.env, SKIP_POSTINSTALL: 'true' }, - }); - execaSync(`git`, [`add`, `yarn.lock`]); - console.log('✅ Updated and staged yarn.lock\n'); - } - - // This will create a release on GitHub - await releaseChangelog({ - versionData: projectsVersionData, - version: workspaceVersion, - dryRun: options.dryRun, - verbose: options.verbose, - }); - - // An explicit null value here means that no changes were detected across any package - // eslint-disable-next-line eqeqeq - if (workspaceVersion === null) { - console.log( - '⏭️ No changes detected across any package, skipping publish step altogether', - ); - } else { - await releasePublish({ - dryRun: options.dryRun, - verbose: options.verbose, - }); - } - - // eslint-disable-next-line no-process-exit - process.exit(0); - } catch (err) { - console.error(err); - // eslint-disable-next-line no-process-exit - process.exit(1); - } -})(); diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 36b912142b9a..7e9f118ed405 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -7,6 +7,7 @@ "extends": "./tsconfig.base.json", "include": [ "tools/**/*.ts", + "tools/**/*.mts", ".eslintrc.js", "jest.config.base.js", "jest.config.js", From 9a6535a4bfd2bc31110d12f9184f357e61578d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Sun, 7 Jan 2024 13:29:17 -0500 Subject: [PATCH 045/165] chore: enable eslint-plugin-jsdoc internally (#8145) * chore: enable eslint-plugin-jsdoc internally * Disable jsdoc/check-param-names, with link to issue * Sort jsdoc rule disables and add links to issues * Switch typescript-estree-import.ts to line comments --- .eslintrc.js | 22 ++++++- package.json | 1 + .../util/parsers/typescript-estree-import.ts | 26 ++++---- .../src/rules/adjacent-overload-signatures.ts | 2 +- .../src/rules/consistent-type-imports.ts | 3 +- .../src/rules/func-call-spacing.ts | 3 +- .../src/rules/member-delimiter-style.ts | 2 +- .../src/rules/member-ordering.ts | 3 +- .../eslint-plugin/src/rules/no-loop-func.ts | 1 - packages/eslint-plugin/src/rules/no-shadow.ts | 2 +- .../src/rules/no-unnecessary-condition.ts | 4 +- .../eslint-plugin/src/rules/no-unused-vars.ts | 4 +- .../rules/padding-line-between-statements.ts | 4 +- .../src/rules/prefer-function-type.ts | 1 - .../src/rules/prefer-regexp-exec.ts | 4 +- .../rules/prefer-string-starts-ends-with.ts | 1 - .../src/rules/require-array-sort-compare.ts | 1 - .../src/rules/space-before-function-paren.ts | 10 ++- packages/eslint-plugin/src/util/astUtils.ts | 8 +-- .../src/util/collectUnusedVariables.ts | 1 - .../rules/no-unnecessary-condition.test.ts | 4 +- packages/parser/tests/tools/test-utils.ts | 2 +- .../rule-tester/src/utils/SourceCodeFixer.ts | 6 +- .../rule-tester/src/utils/config-validator.ts | 2 +- packages/scope-manager/src/ScopeManager.ts | 3 - .../src/referencer/VisitorBase.ts | 2 +- packages/type-utils/src/predicates.ts | 14 +++-- packages/typescript-estree/src/convert.ts | 1 - .../create-program/createIsolatedProgram.ts | 1 - packages/typescript-estree/src/node-utils.ts | 5 -- .../src/parseSettings/createParseSettings.ts | 2 - .../tests/lib/semanticInfo.test.ts | 2 - .../typescript-estree/tools/test-utils.ts | 1 - yarn.lock | 62 +++++++++++++++++++ 34 files changed, 135 insertions(+), 75 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index edbd04cf0a89..5698b88c33bb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,6 +10,7 @@ module.exports = { 'eslint-plugin', 'import', 'jest', + 'jsdoc', 'simple-import-sort', 'unicorn', ], @@ -20,6 +21,7 @@ module.exports = { extends: [ 'eslint:recommended', 'plugin:eslint-plugin/recommended', + 'plugin:jsdoc/recommended-typescript-error', 'plugin:@typescript-eslint/strict-type-checked', 'plugin:@typescript-eslint/stylistic-type-checked', ], @@ -140,6 +142,7 @@ module.exports = { 'error', { commentPattern: '.*intentional fallthrough.*' }, ], + 'one-var': ['error', 'never'], // // eslint-plugin-eslint-comment @@ -215,7 +218,24 @@ module.exports = { // enforce a sort order across the codebase 'simple-import-sort/imports': 'error', - 'one-var': ['error', 'never'], + // + // eslint-plugin-jsdoc + // + + // We often use @remarks or other ad-hoc tag names + 'jsdoc/check-tag-names': 'off', + // https://github.com/gajus/eslint-plugin-jsdoc/issues/1169 + 'jsdoc/check-param-names': 'off', + // https://github.com/gajus/eslint-plugin-jsdoc/issues/1175 + 'jsdoc/require-jsdoc': 'off', + 'jsdoc/require-param': 'off', + 'jsdoc/require-returns': 'off', + 'jsdoc/require-yields': 'off', + 'jsdoc/tag-lines': 'off', + + // + // eslint-plugin-unicorn + // 'unicorn/no-typeof-undefined': 'error', }, diff --git a/package.json b/package.json index e1f231c13a54..2e5620ee1d0c 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,7 @@ "eslint-plugin-eslint-plugin": "^5.1.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-jest": "^27.2.2", + "eslint-plugin-jsdoc": "^46.9.1", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", diff --git a/packages/ast-spec/tests/util/parsers/typescript-estree-import.ts b/packages/ast-spec/tests/util/parsers/typescript-estree-import.ts index a517c0eed319..d84ba32cd975 100644 --- a/packages/ast-spec/tests/util/parsers/typescript-estree-import.ts +++ b/packages/ast-spec/tests/util/parsers/typescript-estree-import.ts @@ -1,17 +1,15 @@ -/** - * Nx is picking up on the fact that we technically have a circular dependency between ast-spec - * and typescript-estree. - * - * This circular dependency only occurs in the tests/ for ast-spec and not in the main package source. - * - * We could therefore solve this by separating the ast-spec tests out into their own package, but the - * other option is to get Nx to turn a blind eye to the circular dependency by removing - * @typescript-eslint/typescript-estree as an explicit devDependency in the package.json and just doing an import here. - * - * This file is ignored via a root `.nxignore` - * - * This should be the only place in the package that we import from typescript-estree. - */ +// Nx is picking up on the fact that we technically have a circular dependency between ast-spec +// and typescript-estree. +// +// This circular dependency only occurs in the tests/ for ast-spec and not in the main package source. +// +// We could therefore solve this by separating the ast-spec tests out into their own package, but the +// other option is to get Nx to turn a blind eye to the circular dependency by removing +// @typescript-eslint/typescript-estree as an explicit devDependency in the package.json and just doing an import here. +// +// This file is ignored via a root `.nxignore` +// +// This should be the only place in the package that we import from typescript-estree. // eslint-disable-next-line no-restricted-imports -- the only safe and valid import from typescript-estree in this package export { parse, TSError } from '@typescript-eslint/typescript-estree'; diff --git a/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts b/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts index 45aee8fe043b..b55e7202f555 100644 --- a/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts +++ b/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts @@ -129,7 +129,7 @@ export default createRule({ /** * Check the body for overload methods. - * @param {ASTNode} node the body to be inspected. + * @param node the body to be inspected. */ function checkBodyForOverloadMethods(node: RuleNode): void { const members = getMembers(node); diff --git a/packages/eslint-plugin/src/rules/consistent-type-imports.ts b/packages/eslint-plugin/src/rules/consistent-type-imports.ts index fd452d750b66..4bceed75f740 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-imports.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-imports.ts @@ -277,7 +277,8 @@ export default createRule({ report.unusedSpecifiers.length === 0 && report.node.importKind !== 'type' ) { - /** checks if import has type assertions + /** + * checks if import has type assertions * ``` * import * as type from 'mod' assert { type: 'json' }; * ``` diff --git a/packages/eslint-plugin/src/rules/func-call-spacing.ts b/packages/eslint-plugin/src/rules/func-call-spacing.ts index 03e8a3683859..510730fca997 100644 --- a/packages/eslint-plugin/src/rules/func-call-spacing.ts +++ b/packages/eslint-plugin/src/rules/func-call-spacing.ts @@ -82,8 +82,7 @@ export default createRule({ /** * Check if open space is present in a function name - * @param {ASTNode} node node to evaluate - * @returns {void} + * @param node node to evaluate * @private */ function checkSpacing( diff --git a/packages/eslint-plugin/src/rules/member-delimiter-style.ts b/packages/eslint-plugin/src/rules/member-delimiter-style.ts index 1068387b6b13..08e44c52abe2 100644 --- a/packages/eslint-plugin/src/rules/member-delimiter-style.ts +++ b/packages/eslint-plugin/src/rules/member-delimiter-style.ts @@ -314,7 +314,7 @@ export default createRule({ /** * Check the member separator being used matches the delimiter. - * @param {ASTNode} node the node to be evaluated. + * @param node the node to be evaluated. */ function checkMemberSeparatorStyle( node: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral, diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index 95d6c3715e0f..c404823dfd80 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -438,7 +438,6 @@ function getMemberRawName( * Gets the member name based on the member type. * * @param node the node to be evaluated. - * @param sourceCode */ function getMemberName( node: Member, @@ -801,7 +800,7 @@ export default createRule({ * Checks if the members are alphabetically sorted. * * @param members Members to be validated. - * @param caseSensitive indicates if the alpha ordering is case sensitive or not. + * @param order What order the members should be sorted in. * * @return True if all members are correctly sorted. */ diff --git a/packages/eslint-plugin/src/rules/no-loop-func.ts b/packages/eslint-plugin/src/rules/no-loop-func.ts index 7e6819064708..c78e266da2a3 100644 --- a/packages/eslint-plugin/src/rules/no-loop-func.ts +++ b/packages/eslint-plugin/src/rules/no-loop-func.ts @@ -35,7 +35,6 @@ export default createRule({ * - has any references which refers to an unsafe variable. * * @param node The AST node to check. - * @returns Whether or not the node is within a loop. */ function checkForLoops( node: diff --git a/packages/eslint-plugin/src/rules/no-shadow.ts b/packages/eslint-plugin/src/rules/no-shadow.ts index c1e637962a5f..2904d7dbb1f6 100644 --- a/packages/eslint-plugin/src/rules/no-shadow.ts +++ b/packages/eslint-plugin/src/rules/no-shadow.ts @@ -545,7 +545,7 @@ export default createRule({ /** * Checks the current context for shadowed variables. - * @param {Scope} scope Fixme + * @param scope Fixme */ function checkForShadows(scope: TSESLint.Scope.Scope): void { // ignore global augmentation diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index a55fd0d3956a..40787600143f 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -310,8 +310,8 @@ export default createRule({ * NOTE: It's also unnecessary if the types that don't overlap at all * but that case is handled by the Typescript compiler itself. * Known exceptions: - * * https://github.com/microsoft/TypeScript/issues/32627 - * * https://github.com/microsoft/TypeScript/issues/37160 (handled) + * - https://github.com/microsoft/TypeScript/issues/32627 + * - https://github.com/microsoft/TypeScript/issues/37160 (handled) */ const BOOL_OPERATORS = new Set([ '<', diff --git a/packages/eslint-plugin/src/rules/no-unused-vars.ts b/packages/eslint-plugin/src/rules/no-unused-vars.ts index 47992ed91458..be8fcbe337e5 100644 --- a/packages/eslint-plugin/src/rules/no-unused-vars.ts +++ b/packages/eslint-plugin/src/rules/no-unused-vars.ts @@ -159,8 +159,8 @@ export default createRule({ function collectUnusedVariables(): TSESLint.Scope.Variable[] { /** * Checks whether a node is a sibling of the rest property or not. - * @param {ASTNode} node a node to check - * @returns {boolean} True if the node is a sibling of the rest property, otherwise false. + * @param node a node to check + * @returns True if the node is a sibling of the rest property, otherwise false. */ function hasRestSibling(node: TSESTree.Node): boolean { return ( diff --git a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts index 9c6555eb9075..4359cd5d0876 100644 --- a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts +++ b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts @@ -182,8 +182,8 @@ function isCJSRequire(node: TSESTree.Node): boolean { /** * Checks whether the given node is a block-like statement. * This checks the last token of the node is the closing brace of a block. - * @param sourceCode The source code to get tokens. * @param node The node to check. + * @param sourceCode The source code to get tokens. * @returns `true` if the node is a block-like statement. * @private */ @@ -323,8 +323,8 @@ function isExpression( * * foo() * ;[1, 2, 3].forEach(bar) - * @param sourceCode The source code to get tokens. * @param node The node to get. + * @param sourceCode The source code to get tokens. * @returns The actual last token. * @private */ diff --git a/packages/eslint-plugin/src/rules/prefer-function-type.ts b/packages/eslint-plugin/src/rules/prefer-function-type.ts index eecb8dc3ac4c..c1d4bc8ec9c1 100644 --- a/packages/eslint-plugin/src/rules/prefer-function-type.ts +++ b/packages/eslint-plugin/src/rules/prefer-function-type.ts @@ -70,7 +70,6 @@ export default createRule({ /** * @param member The TypeElement being checked * @param node The parent of member being checked - * @param tsThisTypes */ function checkMember( member: TSESTree.TypeElement, diff --git a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts index 585bbe345b31..4669cc2a97c6 100644 --- a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts +++ b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts @@ -46,7 +46,7 @@ export default createRule({ /** * Check if a given node type is a string. - * @param node The node type to check. + * @param type The node type to check. */ function isStringType(type: ts.Type): boolean { return getTypeName(checker, type) === 'string'; @@ -54,7 +54,7 @@ export default createRule({ /** * Check if a given node type is a RegExp. - * @param node The node type to check. + * @param type The node type to check. */ function isRegExpType(type: ts.Type): boolean { return getTypeName(checker, type) === 'RegExp'; diff --git a/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts b/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts index 381d11529375..d63e58d88f93 100644 --- a/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts +++ b/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts @@ -78,7 +78,6 @@ export default createRule({ /** * Check if a given node is a `Literal` node that is a character. * @param node The node to check. - * @param kind The method name to get a character. */ function isCharacter(node: TSESTree.Node): node is TSESTree.Literal { const evaluated = getStaticValue(node, globalScope); diff --git a/packages/eslint-plugin/src/rules/require-array-sort-compare.ts b/packages/eslint-plugin/src/rules/require-array-sort-compare.ts index fe246a6d8bf2..e6f83e800bbb 100644 --- a/packages/eslint-plugin/src/rules/require-array-sort-compare.ts +++ b/packages/eslint-plugin/src/rules/require-array-sort-compare.ts @@ -54,7 +54,6 @@ export default createRule({ /** * Check if a given node is an array which all elements are string. - * @param node */ function isStringArrayNode(node: TSESTree.Expression): boolean { const type = services.getTypeAtLocation(node); diff --git a/packages/eslint-plugin/src/rules/space-before-function-paren.ts b/packages/eslint-plugin/src/rules/space-before-function-paren.ts index 9e3366f3a9b1..d3966db56558 100644 --- a/packages/eslint-plugin/src/rules/space-before-function-paren.ts +++ b/packages/eslint-plugin/src/rules/space-before-function-paren.ts @@ -70,8 +70,8 @@ export default createRule({ /** * Determines whether a function has a name. - * @param {ASTNode} node The function node. - * @returns {boolean} Whether the function has a name. + * @param node The function node. + * @returns Whether the function has a name. */ function isNamedFunction( node: @@ -97,8 +97,7 @@ export default createRule({ /** * Gets the config for a given function - * @param {ASTNode} node The function node - * @returns {string} "always", "never", or "ignore" + * @param node The function node */ function getConfigForFunction( node: @@ -129,8 +128,7 @@ export default createRule({ /** * Checks the parens of a function node - * @param {ASTNode} node A function node - * @returns {void} + * @param node A function node */ function checkFunction( node: diff --git a/packages/eslint-plugin/src/util/astUtils.ts b/packages/eslint-plugin/src/util/astUtils.ts index c104a5b6476d..daa69bc85831 100644 --- a/packages/eslint-plugin/src/util/astUtils.ts +++ b/packages/eslint-plugin/src/util/astUtils.ts @@ -11,10 +11,10 @@ export * from '@typescript-eslint/utils/ast-utils'; // Could be export { getNameLocationInGlobalDirectiveComment } from 'eslint/lib/rules/utils/ast-utils' /** * Get the `loc` object of a given name in a `/*globals` directive comment. - * @param {SourceCode} sourceCode The source code to convert index to loc. - * @param {Comment} comment The `/*globals` directive comment which include the name. - * @param {string} name The name to find. - * @returns {SourceLocation} The `loc` object. + * @param sourceCode The source code to convert index to loc. + * @param comment The `/*globals` directive comment which include the name. + * @param name The name to find. + * @returns The `loc` object. */ export function getNameLocationInGlobalDirectiveComment( sourceCode: TSESLint.SourceCode, diff --git a/packages/eslint-plugin/src/util/collectUnusedVariables.ts b/packages/eslint-plugin/src/util/collectUnusedVariables.ts index 81184ec2a08a..0b0b592bf60d 100644 --- a/packages/eslint-plugin/src/util/collectUnusedVariables.ts +++ b/packages/eslint-plugin/src/util/collectUnusedVariables.ts @@ -397,7 +397,6 @@ const MERGABLE_TYPES = new Set([ /** * Determine if the variable is directly exported * @param variable the variable to check - * @param target the type of node that is expected to be exported */ function isMergableExported(variable: TSESLint.Scope.Variable): boolean { // If all of the merged things are of the same type, TS will error if not all of them are exported - so we only need to find one diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts index 89cdd1a73ed5..a3f26300b2c3 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts @@ -254,9 +254,7 @@ function test(a: T) { } `, - /** - * Predicate functions - **/ + // Predicate functions ` // with literal arrow function [0, 1, 2].filter(x => x); diff --git a/packages/parser/tests/tools/test-utils.ts b/packages/parser/tests/tools/test-utils.ts index f36f37440d72..4d86b0d17cf3 100644 --- a/packages/parser/tests/tools/test-utils.ts +++ b/packages/parser/tests/tools/test-utils.ts @@ -43,7 +43,7 @@ export function createSnapshotTestBlock( config = Object.assign({}, defaultConfig, config); /** - * @returns {Object} the AST object + * @returns the AST object */ function parse(): TSESTree.Program { const ast = parser.parseForESLint(code, config).ast; diff --git a/packages/rule-tester/src/utils/SourceCodeFixer.ts b/packages/rule-tester/src/utils/SourceCodeFixer.ts index 9346b42b0803..a1f8fd3cb89d 100644 --- a/packages/rule-tester/src/utils/SourceCodeFixer.ts +++ b/packages/rule-tester/src/utils/SourceCodeFixer.ts @@ -34,7 +34,7 @@ function compareMessagesByLocation(a: LintMessage, b: LintMessage): number { * smart about the fixes and won't apply fixes over the same area in the text. * @param sourceText The text to apply the changes to. * @param messages The array of messages reported by ESLint. - * @returns {Object} An object containing the fixed text and any unfixed messages. + * @returns An object containing the fixed text and any unfixed messages. */ export function applyFixes( sourceText: string, @@ -54,8 +54,8 @@ export function applyFixes( /** * Try to use the 'fix' from a problem. - * @param {Message} problem The message object to apply fixes from - * @returns {boolean} Whether fix was successfully applied + * @param problem The message object to apply fixes from + * @returns Whether fix was successfully applied */ function attemptFix(problem: LintMessageWithFix): boolean { const fix = problem.fix; diff --git a/packages/rule-tester/src/utils/config-validator.ts b/packages/rule-tester/src/utils/config-validator.ts index d3690bc9ba17..4160f81a4de2 100644 --- a/packages/rule-tester/src/utils/config-validator.ts +++ b/packages/rule-tester/src/utils/config-validator.ts @@ -96,7 +96,7 @@ function validateRuleSchema( * Validates a rule's options against its schema. * @param rule The rule that the config is being validated for * @param ruleId The rule's unique name. - * @param {Array|number} options The given options for the rule. + * @param options The given options for the rule. * @param source The name of the configuration source to report in any errors. If null or undefined, * no source is prepended to the message. * @throws {Error} Upon any bad rule configuration. diff --git a/packages/scope-manager/src/ScopeManager.ts b/packages/scope-manager/src/ScopeManager.ts index 66f8bbe500f5..c77bcfe62e92 100644 --- a/packages/scope-manager/src/ScopeManager.ts +++ b/packages/scope-manager/src/ScopeManager.ts @@ -39,7 +39,6 @@ class ScopeManager { public readonly declaredVariables: WeakMap; /** * The root scope - * @public */ public globalScope: GlobalScope | null; public readonly nodeToScope: WeakMap; @@ -93,7 +92,6 @@ class ScopeManager { * Get the variables that a given AST node defines. The gotten variables' `def[].node`/`def[].parent` property is the node. * If the node does not define any variable, this returns an empty array. * @param node An AST node to get their variables. - * @public */ public getDeclaredVariables(node: TSESTree.Node): Variable[] { return this.declaredVariables.get(node) ?? []; @@ -106,7 +104,6 @@ class ScopeManager { * @param node An AST node to get their scope. * @param inner If the node has multiple scopes, this returns the outermost scope normally. * If `inner` is `true` then this returns the innermost scope. - * @public */ public acquire(node: TSESTree.Node, inner = false): Scope | null { function predicate(testScope: Scope): boolean { diff --git a/packages/scope-manager/src/referencer/VisitorBase.ts b/packages/scope-manager/src/referencer/VisitorBase.ts index e21bfc030a7f..43af065b4c6f 100644 --- a/packages/scope-manager/src/referencer/VisitorBase.ts +++ b/packages/scope-manager/src/referencer/VisitorBase.ts @@ -29,7 +29,7 @@ abstract class VisitorBase { /** * Default method for visiting children. * @param node the node whose children should be visited - * @param exclude a list of keys to not visit + * @param excludeArr a list of keys to not visit */ visitChildren( node: T | null | undefined, diff --git a/packages/type-utils/src/predicates.ts b/packages/type-utils/src/predicates.ts index fdc79dc45ac0..37658e31b716 100644 --- a/packages/type-utils/src/predicates.ts +++ b/packages/type-utils/src/predicates.ts @@ -6,16 +6,20 @@ import { getTypeFlags, isTypeFlagSet } from './typeFlagUtils'; const log = debug('typescript-eslint:eslint-plugin:utils:types'); +export interface IsNullableTypeOptions { + /** + * Whether the type is a receiving type (i.e. the type of a called function's parameter). + */ + isReceiver?: boolean; + allowUndefined?: boolean; +} + /** * Checks if the given type is (or accepts) nullable - * @param isReceiver true if the type is a receiving type (i.e. the type of a called function's parameter) */ export function isNullableType( type: ts.Type, - { - isReceiver = false, - allowUndefined = true, - }: { isReceiver?: boolean; allowUndefined?: boolean } = {}, + { isReceiver = false, allowUndefined = true }: IsNullableTypeOptions = {}, ): boolean { const flags = getTypeFlags(type); diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index d25c2cd72e0b..7ebd5cc9e1cb 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -629,7 +629,6 @@ export class Converter { /** * Converts a TypeScript JSX node.tagName into an ESTree node.name * @param node the tagName object from a JSX ts.Node - * @param parent * @returns the converted ESTree name object */ private convertJSXTagName( diff --git a/packages/typescript-estree/src/create-program/createIsolatedProgram.ts b/packages/typescript-estree/src/create-program/createIsolatedProgram.ts index fbe92867dcc8..4c15f4a25bbf 100644 --- a/packages/typescript-estree/src/create-program/createIsolatedProgram.ts +++ b/packages/typescript-estree/src/create-program/createIsolatedProgram.ts @@ -9,7 +9,6 @@ import { createDefaultCompilerOptionsFromExtra } from './shared'; const log = debug('typescript-eslint:typescript-estree:createIsolatedProgram'); /** - * @param code The code of the file being linted * @returns Returns a new source file and program corresponding to the linted code */ function createIsolatedProgram( diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index 8ff1c76ede25..be28c506d959 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -269,7 +269,6 @@ export function getLocFor( /** * Check whatever node can contain directive - * @param node * @returns returns true if node can contain directive */ export function canContainDirective( @@ -771,10 +770,6 @@ export function nodeHasTokens(n: ts.Node, ast: ts.SourceFile): boolean { /** * Like `forEach`, but suitable for use with numbers and strings (which may be falsy). - * @template T - * @template U - * @param array - * @param callback */ export function firstDefined( array: readonly T[] | undefined, diff --git a/packages/typescript-estree/src/parseSettings/createParseSettings.ts b/packages/typescript-estree/src/parseSettings/createParseSettings.ts index fee7dbc1cb4c..49d048391d8f 100644 --- a/packages/typescript-estree/src/parseSettings/createParseSettings.ts +++ b/packages/typescript-estree/src/parseSettings/createParseSettings.ts @@ -208,8 +208,6 @@ function enforceCodeString(code: unknown): string { * * Even if jsx option is set in typescript compiler, filename still has to * contain .tsx file extension. - * - * @param options Parser options */ function getFileName(jsx?: boolean): string { return jsx ? 'estree.tsx' : 'estree.ts'; diff --git a/packages/typescript-estree/tests/lib/semanticInfo.test.ts b/packages/typescript-estree/tests/lib/semanticInfo.test.ts index d580249079ab..9b6d353d48c4 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo.test.ts @@ -445,8 +445,6 @@ function testIsolatedFile( /** * Verifies that the type of a TS node is number[] as expected - * @param {ts.TypeChecker} checker - * @param {ts.Node} tsNode */ function checkNumberArrayType(checker: ts.TypeChecker, tsNode: ts.Node): void { const nodeType = checker.getTypeAtLocation(tsNode); diff --git a/packages/typescript-estree/tools/test-utils.ts b/packages/typescript-estree/tools/test-utils.ts index 8c3ab3aae0f7..7e37d4bac0c6 100644 --- a/packages/typescript-estree/tools/test-utils.ts +++ b/packages/typescript-estree/tools/test-utils.ts @@ -64,7 +64,6 @@ export function formatSnapshotName( /** * Check if file extension is one used for jsx - * @param fileType */ export function isJSXFileType(fileType: string): boolean { if (fileType.startsWith('.')) { diff --git a/yarn.lock b/yarn.lock index 7c39d94cf919..1daeeb30cba8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2897,6 +2897,17 @@ __metadata: languageName: node linkType: hard +"@es-joy/jsdoccomment@npm:~0.41.0": + version: 0.41.0 + resolution: "@es-joy/jsdoccomment@npm:0.41.0" + dependencies: + comment-parser: 1.4.1 + esquery: ^1.5.0 + jsdoc-type-pratt-parser: ~4.0.0 + checksum: cfe0714027ff8fa82dad8c84f75af3f6df9d6797d60c289b8d3c259c5375c134bd5ca630beba0daed3adceef01a74f19e05052018f6b66ad6a4f483adf599c39 + languageName: node + linkType: hard + "@esbuild/aix-ppc64@npm:0.19.10": version: 0.19.10 resolution: "@esbuild/aix-ppc64@npm:0.19.10" @@ -5651,6 +5662,7 @@ __metadata: eslint-plugin-eslint-plugin: ^5.1.0 eslint-plugin-import: ^2.27.5 eslint-plugin-jest: ^27.2.2 + eslint-plugin-jsdoc: ^46.9.1 eslint-plugin-jsx-a11y: ^6.7.1 eslint-plugin-react: ^7.32.2 eslint-plugin-react-hooks: ^4.6.0 @@ -6294,6 +6306,13 @@ __metadata: languageName: node linkType: hard +"are-docs-informative@npm:^0.0.2": + version: 0.0.2 + resolution: "are-docs-informative@npm:0.0.2" + checksum: 7a48ca90d66e29afebc4387d7029d86cfe97bad7e796c8e7de01309e02dcfc027250231c02d4ca208d2984170d09026390b946df5d3d02ac638ab35f74501c74 + languageName: node + linkType: hard + "are-we-there-yet@npm:^3.0.0": version: 3.0.0 resolution: "are-we-there-yet@npm:3.0.0" @@ -7665,6 +7684,13 @@ __metadata: languageName: node linkType: hard +"comment-parser@npm:1.4.1": + version: 1.4.1 + resolution: "comment-parser@npm:1.4.1" + checksum: e0f6f60c5139689c4b1b208ea63e0730d9195a778e90dd909205f74f00b39eb0ead05374701ec5e5c29d6f28eb778cd7bc41c1366ab1d271907f1def132d6bf1 + languageName: node + linkType: hard + "common-tags@npm:^1.8.0": version: 1.8.2 resolution: "common-tags@npm:1.8.2" @@ -9421,6 +9447,25 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-jsdoc@npm:^46.9.1": + version: 46.9.1 + resolution: "eslint-plugin-jsdoc@npm:46.9.1" + dependencies: + "@es-joy/jsdoccomment": ~0.41.0 + are-docs-informative: ^0.0.2 + comment-parser: 1.4.1 + debug: ^4.3.4 + escape-string-regexp: ^4.0.0 + esquery: ^1.5.0 + is-builtin-module: ^3.2.1 + semver: ^7.5.4 + spdx-expression-parse: ^4.0.0 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + checksum: c1307398f9cf79ad1479b7f2c08ffc150d2b4f9747880f6a0de2f34dc1b04ec34d01acbd69d0ed1a4d1e435dba6683bd1446b3ff89a2074e9c739e15d22c228f + languageName: node + linkType: hard + "eslint-plugin-jsx-a11y@npm:^6.7.1": version: 6.8.0 resolution: "eslint-plugin-jsx-a11y@npm:6.8.0" @@ -12674,6 +12719,13 @@ __metadata: languageName: node linkType: hard +"jsdoc-type-pratt-parser@npm:~4.0.0": + version: 4.0.0 + resolution: "jsdoc-type-pratt-parser@npm:4.0.0" + checksum: af0629c9517e484be778d8564440fec8de5b7610e0c9c88a3ba4554321364faf72b46689c8d8845faa12c0718437a9ed97e231977efc0f2d50e8a2dbad807eb3 + languageName: node + linkType: hard + "jsesc@npm:^2.5.1": version: 2.5.2 resolution: "jsesc@npm:2.5.2" @@ -17190,6 +17242,16 @@ __metadata: languageName: node linkType: hard +"spdx-expression-parse@npm:^4.0.0": + version: 4.0.0 + resolution: "spdx-expression-parse@npm:4.0.0" + dependencies: + spdx-exceptions: ^2.1.0 + spdx-license-ids: ^3.0.0 + checksum: 936be681fbf5edeec3a79c023136479f70d6edb3fd3875089ac86cd324c6c8c81add47399edead296d1d0af17ae5ce88c7f88885eb150b62c2ff6e535841ca6a + languageName: node + linkType: hard + "spdx-license-ids@npm:^3.0.0": version: 3.0.13 resolution: "spdx-license-ids@npm:3.0.13" From c9e35b6bf19dd97dcbceb6a5bb0bd562cc55615d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Sun, 7 Jan 2024 13:29:43 -0500 Subject: [PATCH 046/165] docs: document allowAutomaticSingleRunInference (#8138) * docs: document allowAutomaticSingleRunInference * so 'no' need --- .eslintrc.js | 15 ++++++--------- docs/packages/Parser.mdx | 21 ++++++++++++++++++++- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 5698b88c33bb..f4d869788ce9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -26,7 +26,12 @@ module.exports = { 'plugin:@typescript-eslint/stylistic-type-checked', ], parserOptions: { - sourceType: 'module', + allowAutomaticSingleRunInference: true, + cacheLifetime: { + // we pretty well never create/change tsconfig structure - so no need to ever evict the cache + // in the rare case that we do - just need to manually restart their IDE. + glob: 'Infinity', + }, project: [ './tsconfig.eslint.json', './packages/*/tsconfig.json', @@ -40,15 +45,7 @@ module.exports = { './packages/scope-manager/tsconfig.build.json', './packages/scope-manager/tsconfig.spec.json', ], - allowAutomaticSingleRunInference: true, tsconfigRootDir: __dirname, - warnOnUnsupportedTypeScriptVersion: false, - EXPERIMENTAL_useSourceOfProjectReferenceRedirect: false, - cacheLifetime: { - // we pretty well never create/change tsconfig structure - so need to ever evict the cache - // in the rare case that we do - just need to manually restart their IDE. - glob: 'Infinity', - }, }, rules: { // make sure we're not leveraging any deprecated APIs diff --git a/docs/packages/Parser.mdx b/docs/packages/Parser.mdx index efaa66924ce5..5d5860493103 100644 --- a/docs/packages/Parser.mdx +++ b/docs/packages/Parser.mdx @@ -30,6 +30,7 @@ The following additional configuration options are available by specifying them ```ts interface ParserOptions { + allowAutomaticSingleRunInference?: boolean; cacheLifetime?: { glob?: number | 'Infinity'; }; @@ -49,16 +50,32 @@ interface ParserOptions { projectFolderIgnoreList?: string[]; tsconfigRootDir?: string; warnOnUnsupportedTypeScriptVersion?: boolean; + EXPERIMENTAL_useProjectService?: boolean; } ``` +### `allowAutomaticSingleRunInference` + +> Default `false`. + +Whether to use common heuristics to infer whether ESLint is being used as part of a single run (as opposed to `--fix` mode or in a persistent session such as an editor extension). + +When typescript-eslint handles TypeScript Program management behind the scenes for [linting with type information](../linting/Typed_Linting.mdx), this distinction is important for performance. +There is significant overhead to managing TypeScript "Watch" Programs needed for the long-running use-case. +Being able to assume the single run case allows typescript-eslint to faster immutable Programs instead. + +:::tip +We've seen `allowAutomaticSingleRunInference` improve linting speed in CI by up to 10-20%. +Our plan is to [enable `allowAutomaticSingleRunInference` by default in an upcoming major version](https://github.com/typescript-eslint/typescript-eslint/issues/8121). +::: + ### `cacheLifetime` This option allows you to granularly control our internal cache expiry lengths. You can specify the number of seconds as an integer number, or the string 'Infinity' if you never want the cache to expire. -By default cache entries will be evicted after 30 seconds, or will persist indefinitely if the parser infers that it is a single run. +By default cache entries will be evicted after 30 seconds, or will persist indefinitely if the parser infers that it is a single run (see [`allowAutomaticSingleRunInference`](#allowAutomaticSingleRunInference)). ### `ecmaFeatures` @@ -267,6 +284,8 @@ Please only submit bug reports when using the officially supported version. ### `EXPERIMENTAL_useProjectService` +> Default `false`. + An experimental alternative to `parserOptions.project`. This directs the parser to use a more seamless TypeScript API to generate type information for rules. It will automatically detect the TSConfig for each file (like `project: true`), and will also allow type information to be computed for JavaScript files without the `allowJs` compiler option (unlike `project: true`). From 7a36d05cfcde179dc54183908f23148752d2b72b Mon Sep 17 00:00:00 2001 From: Hao Cheng Date: Mon, 8 Jan 2024 17:07:33 +0100 Subject: [PATCH 047/165] chore: prevent a11y-alt-text-bot workflow when author is a bot (#8212) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: prevent a11y-alt-text-bot workflow when author is a bot * Update .github/workflows/a11y-alt-bot.yml --------- Co-authored-by: Josh Goldberg ✨ --- .github/workflows/a11y-alt-bot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/a11y-alt-bot.yml b/.github/workflows/a11y-alt-bot.yml index 926720c80153..3d36d24e9598 100644 --- a/.github/workflows/a11y-alt-bot.yml +++ b/.github/workflows/a11y-alt-bot.yml @@ -19,6 +19,7 @@ permissions: jobs: accessibility_alt_text_bot: name: Check alt text is set on images + if: ${{ !endsWith(github.actor, '[bot]') }} runs-on: ubuntu-latest steps: - name: Get action 'github/accessibility-alt-text-bot' From 98f37e6097e24869deabc0d738d9b46ffd6537b0 Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Mon, 8 Jan 2024 19:25:19 +0300 Subject: [PATCH 048/165] chore(typescript-estree): remove unnecessary old snapshots (#8198) * chore(typescript-estree): remove unnecessary old snapshots Co-authored-by: Brad Zacher * chore: remove unused jest include patterns --------- Co-authored-by: Brad Zacher --- packages/typescript-estree/jest.config.js | 6 +- .../block-trailing-comment.src.js.shot | 232 - .../comment-within-condition.src.js.shot | 229 - ...export-default-anonymous-class.src.js.shot | 399 - .../comments/jsdoc-comment.src.js.shot | 354 - .../jsx-attr-and-text-with-url.src.js.shot | 559 - .../comments/jsx-block-comment.src.js.shot | 750 -- .../jsx-comment-after-jsx.src.js.shot | 599 - ...comment-after-self-closing-jsx.src.js.shot | 511 - ...sx-generic-with-comment-in-tag.src.js.shot | 3732 ------- .../jsx-tag-comment-after-prop.src.js.shot | 799 -- .../comments/jsx-tag-comments.src.js.shot | 658 -- ...ext-with-multiline-non-comment.src.js.shot | 630 -- .../comments/jsx-text-with-url.src.js.shot | 2303 ---- .../jsx-with-greather-than.src.js.shot | 894 -- .../comments/jsx-with-operators.src.js.shot | 894 -- .../mix-line-and-block-comments.src.js.shot | 251 - .../comments/no-comment-regex.src.js.shot | 204 - .../comments/no-comment-template.src.js.shot | 299 - .../surrounding-call-comments.src.js.shot | 367 - .../surrounding-debugger-comments.src.js.shot | 289 - .../surrounding-return-comments.src.js.shot | 290 - .../surrounding-throw-comments.src.js.shot | 326 - ...urrounding-while-loop-comments.src.js.shot | 513 - ...allthrough-comment-in-function.src.js.shot | 738 -- .../switch-fallthrough-comment.src.js.shot | 526 - ...no-default-comment-in-function.src.js.shot | 698 -- ...lt-comment-in-nested-functions.src.js.shot | 1608 --- .../switch-no-default-comment.src.js.shot | 340 - .../template-string-block.src.js.shot | 423 - ...type-assertion-regression-test.src.ts.shot | 327 - .../array-literal-in-lhs.src.js.shot | 364 - .../array-literals-in-binary-expr.src.js.shot | 207 - .../as-param-with-params.src.js.shot | 388 - .../arrowFunctions/as-param.src.js.shot | 291 - .../basic-in-binary-expression.src.js.shot | 697 -- .../arrowFunctions/basic.src.js.shot | 178 - .../block-body-not-object.src.js.shot | 329 - .../arrowFunctions/block-body.src.js.shot | 273 - .../error-dup-params.src.js.shot | 275 - ...rror-strict-default-param-eval.src.js.shot | 366 - .../error-strict-dup-params.src.js.shot | 348 - .../error-strict-eval-return.src.js.shot | 273 - .../error-strict-eval.src.js.shot | 346 - .../error-strict-octal.src.js.shot | 291 - .../error-strict-param-arguments.src.js.shot | 348 - .../error-strict-param-eval.src.js.shot | 348 - .../error-strict-param-names.src.js.shot | 348 - ...trict-param-no-paren-arguments.src.js.shot | 255 - ...ror-strict-param-no-paren-eval.src.js.shot | 255 - .../error-two-lines.src.js.shot | 274 - .../arrowFunctions/expression.src.js.shot | 220 - .../arrowFunctions/iife.src.js.shot | 352 - .../multiple-params.src.js.shot | 275 - .../arrowFunctions/no-auto-return.src.js.shot | 366 - .../not-strict-arguments.src.js.shot | 182 - .../not-strict-eval-params.src.js.shot | 275 - .../not-strict-eval.src.js.shot | 182 - .../not-strict-octal.src.js.shot | 218 - .../return-arrow-function.src.js.shot | 264 - .../return-sequence.src.js.shot | 600 - .../single-param-parens.src.js.shot | 218 - ...single-param-return-identifier.src.js.shot | 220 - .../arrowFunctions/single-param.src.js.shot | 182 - .../and-operator-array-object.src.js.shot | 1855 ---- .../basics/delete-expression.src.js.shot | 215 - .../basics/do-while-statements.src.js.shot | 797 -- .../identifiers-double-underscore.src.js.shot | 502 - .../javascript/basics/instanceof.src.js.shot | 157 - .../new-with-member-expression.src.js.shot | 251 - .../basics/new-without-parens.src.js.shot | 310 - .../or-operator-array-object.src.js.shot | 1855 ---- .../basics/typeof-expression.src.js.shot | 119 - .../basics/update-expression.src.js.shot | 611 -- .../basics/void-expression.src.js.shot | 283 - .../bigIntLiterals/binary.src.js.shot | 101 - .../bigIntLiterals/decimal.src.js.shot | 101 - .../javascript/bigIntLiterals/hex.src.js.shot | 101 - .../numeric-separator.src.js.shot | 101 - .../bigIntLiterals/octal.src.js.shot | 101 - .../binaryLiterals/lowercase.src.js.shot | 100 - .../binaryLiterals/uppercase.src.js.shot | 100 - .../blockBindings/const.src.js.shot | 198 - .../let-in-switchcase.src.js.shot | 490 - .../javascript/blockBindings/let.src.js.shot | 198 - .../call-expression-with-array.src.js.shot | 213 - .../call-expression-with-object.src.js.shot | 213 - .../mixed-expression.src.js.shot | 973 -- .../new-expression-with-array.src.js.shot | 543 - .../new-expression-with-object.src.js.shot | 230 - .../class-accessor-properties.src.js.shot | 650 -- .../class-computed-static-method.src.js.shot | 449 - .../classes/class-expression.src.js.shot | 196 - .../class-method-named-prototype.src.js.shot | 377 - .../class-method-named-static.src.js.shot | 395 - .../class-method-named-with-space.src.js.shot | 342 - .../class-one-method-super.src.js.shot | 505 - .../classes/class-one-method.src.js.shot | 377 - ...ss-private-identifier-accessor.src.js.shot | 1061 -- ...class-private-identifier-field.src.js.shot | 778 -- ...lass-private-identifier-method.src.js.shot | 719 -- ...-static-method-named-prototype.src.js.shot | 429 - ...ass-static-method-named-static.src.js.shot | 413 - .../classes/class-static-method.src.js.shot | 413 - ...ethods-and-accessor-properties.src.js.shot | 865 -- ...ss-two-computed-static-methods.src.js.shot | 682 -- ...o-methods-computed-constructor.src.js.shot | 590 - .../class-two-methods-semi.src.js.shot | 574 - .../class-two-methods-three-semi.src.js.shot | 610 - .../class-two-methods-two-semi.src.js.shot | 592 - .../classes/class-two-methods.src.js.shot | 556 - ...atic-methods-named-constructor.src.js.shot | 592 - ...ss-with-constructor-parameters.src.js.shot | 439 - ...ss-with-constructor-with-space.src.js.shot | 377 - .../class-with-constructor.src.js.shot | 377 - .../derived-class-assign-to-var.src.js.shot | 348 - .../derived-class-expression.src.js.shot | 250 - .../empty-class-double-semi.src.js.shot | 197 - .../classes/empty-class-semi.src.js.shot | 215 - .../classes/empty-class.src.js.shot | 197 - .../empty-literal-derived-class.src.js.shot | 251 - .../invalid-class-declaration.src.js.shot | 159 - ...valid-class-setter-declaration.src.js.shot | 395 - .../named-class-expression.src.js.shot | 234 - ...named-derived-class-expression.src.js.shot | 288 - .../comma-operator-conditional.src.js.shot | 474 - .../comma-operator-multi.src.js.shot | 581 - .../comma-operator-nested.src.js.shot | 691 -- .../comma-operator-return.src.js.shot | 593 - .../comma-operator-simple-nested.src.js.shot | 378 - .../comma-operator-simple.src.js.shot | 232 - .../class-constructor.src.js.shot | 457 - .../defaultParams/class-method.src.js.shot | 457 - .../defaultParams/declaration.src.js.shot | 313 - .../defaultParams/expression.src.js.shot | 368 - .../defaultParams/method.src.js.shot | 502 - .../defaultParams/not-all-params.src.js.shot | 521 - .../arrow-param-array.src.js.shot | 278 - .../arrow-param-nested-array.src.js.shot | 393 - ...rrow-param-nested-object-named.src.js.shot | 630 -- .../arrow-param-nested-object.src.js.shot | 558 - .../arrow-param-object.src.js.shot | 321 - .../param-defaults-array.src.js.shot | 335 - .../param-defaults-object-nested.src.js.shot | 802 -- .../param-defaults-object.src.js.shot | 378 - .../array-const-undefined.src.js.shot | 271 - .../array-let-undefined.src.js.shot | 271 - .../object-const-named.src.js.shot | 350 - .../object-const-undefined.src.js.shot | 314 - .../object-let-named.src.js.shot | 350 - .../object-let-undefined.src.js.shot | 314 - .../param-array.src.js.shot | 461 - .../param-object-short.src.js.shot | 680 -- .../param-object-wrapped.src.js.shot | 716 -- .../param-object.src.js.shot | 621 -- .../destructuring-and-forOf/loop.src.js.shot | 288 - .../complex-destructured.src.js.shot | 532 - .../destructured-array-literal.src.js.shot | 446 - .../destructuring-param.src.js.shot | 542 - ...plex-destructured-spread-first.src.js.shot | 532 - .../invalid-not-final-array-empty.src.js.shot | 292 - .../multi-destructured.src.js.shot | 331 - .../not-final-array.src.js.shot | 331 - .../single-destructured.src.js.shot | 274 - .../var-complex-destructured.src.js.shot | 553 - ...var-destructured-array-literal.src.js.shot | 467 - .../var-multi-destructured.src.js.shot | 352 - .../var-single-destructured.src.js.shot | 295 - .../destructuring/array-member.src.js.shot | 309 - .../destructuring/array-to-array.src.js.shot | 404 - .../array-var-undefined.src.js.shot | 271 - ...l-expression-destruction-array.src.js.shot | 248 - ...-expression-destruction-object.src.js.shot | 248 - ...class-constructor-params-array.src.js.shot | 497 - ...structor-params-defaults-array.src.js.shot | 647 -- ...tructor-params-defaults-object.src.js.shot | 733 -- ...lass-constructor-params-object.src.js.shot | 583 - .../class-method-params-array.src.js.shot | 497 - ...s-method-params-defaults-array.src.js.shot | 647 -- ...-method-params-defaults-object.src.js.shot | 733 -- .../class-method-params-object.src.js.shot | 583 - .../defaults-array-all.src.js.shot | 595 - ...ts-array-longform-nested-multi.src.js.shot | 819 -- .../defaults-array-multi.src.js.shot | 445 - .../defaults-array-nested-all.src.js.shot | 521 - .../defaults-array-nested-multi.src.js.shot | 446 - .../destructuring/defaults-array.src.js.shot | 292 - .../defaults-object-all.src.js.shot | 724 -- .../defaults-object-assign.src.js.shot | 561 - .../defaults-object-longform-all.src.js.shot | 832 -- ...defaults-object-longform-multi.src.js.shot | 682 -- .../defaults-object-longform.src.js.shot | 410 - .../defaults-object-mixed-multi.src.js.shot | 610 - .../defaults-object-multi.src.js.shot | 574 - .../defaults-object-nested-all.src.js.shot | 686 -- .../defaults-object-nested-multi.src.js.shot | 611 -- .../destructuring/defaults-object.src.js.shot | 356 - .../destructured-array-catch.src.js.shot | 960 -- .../destructured-object-catch.src.js.shot | 1003 -- ...invalid-defaults-object-assign.src.js.shot | 558 - .../destructuring/named-param.src.js.shot | 350 - .../destructuring/nested-array.src.js.shot | 682 -- .../destructuring/nested-object.src.js.shot | 1008 -- .../object-var-named.src.js.shot | 350 - .../object-var-undefined.src.js.shot | 314 - .../param-defaults-array.src.js.shot | 371 - .../param-defaults-object-nested.src.js.shot | 761 -- .../param-defaults-object.src.js.shot | 414 - .../params-array-wrapped.src.js.shot | 425 - .../destructuring/params-array.src.js.shot | 388 - .../params-multi-object.src.js.shot | 431 - .../params-nested-array.src.js.shot | 484 - .../params-nested-object.src.js.shot | 683 -- .../params-object-wrapped.src.js.shot | 511 - .../destructuring/params-object.src.js.shot | 474 - .../destructuring/sparse-array.src.js.shot | 311 - .../javascript/directives/block.src.js.shot | 514 - .../directives/directive-in-class.src.js.shot | 1324 --- .../directives/first-expression.src.js.shot | 192 - .../function-non-strict.src.js.shot | 400 - .../non-directive-string.src.js.shot | 978 -- .../directives/program-order.src.js.shot | 288 - .../javascript/directives/program.src.js.shot | 342 - .../async-generators.src.js.shot | 234 - .../async-iterator.src.js.shot | 515 - .../dynamic-import.src.js.shot | 344 - .../arg-spread.src.js.shot | 435 - .../destructuring-assign-mirror.src.js.shot | 582 - ...nction-parameter-object-spread.src.js.shot | 335 - .../invalid-rest-trailing-comma.src.js.shot | 513 - .../object-rest.src.js.shot | 1029 -- .../property-spread.src.js.shot | 903 -- .../shorthand-method-args.src.js.shot | 686 -- .../shorthand-methods.src.js.shot | 746 -- .../shorthand-properties.src.js.shot | 755 -- .../single-spread.src.js.shot | 827 -- .../spread-trailing-comma.src.js.shot | 428 - .../two-spread.src.js.shot | 783 -- .../exponential-operators.src.js.shot | 417 - .../javascript/for/for-loop.src.js.shot | 527 - .../javascript/for/for-with-coma.src.js.shot | 772 -- .../javascript/for/for-with-const.src.js.shot | 454 - .../for/for-with-function.src.js.shot | 639 -- .../javascript/for/for-with-let.src.js.shot | 454 - .../javascript/forIn/for-in-array.src.js.shot | 263 - .../forIn/for-in-bare-nonstrict.src.js.shot | 1663 --- .../for-in-destruction-object.src.js.shot | 507 - .../forIn/for-in-destruction.src.js.shot | 421 - .../forIn/for-in-object-with-body.src.js.shot | 263 - .../forIn/for-in-with-assigment.src.js.shot | 477 - .../for-in-with-bare-assigment.src.js.shot | 304 - .../forIn/for-in-with-const.src.js.shot | 423 - .../for-in-with-milti-asigment.src.js.shot | 418 - .../forIn/for-in-with-rest.src.js.shot | 481 - .../forIn/for-in-with-var.src.js.shot | 423 - .../javascript/forOf/for-of-array.src.js.shot | 399 - .../for-of-destruction-object.src.js.shot | 508 - .../forOf/for-of-destruction.src.js.shot | 422 - .../forOf/for-of-object.src.js.shot | 399 - ...r-of-with-function-initializer.src.js.shot | 737 -- .../forOf/for-of-with-rest.src.js.shot | 482 - .../for-of-with-var-and-braces.src.js.shot | 439 - .../for-of-with-var-and-no-braces.src.js.shot | 384 - ...or-of-with-const-and-no-braces.src.js.shot | 384 - ...-for-of-with-let-and-no-braces.src.js.shot | 384 - .../return-multiline-sequence.src.js.shot | 614 -- .../function/return-sequence.src.js.shot | 614 -- .../anonymous-generator.src.js.shot | 344 - .../async-generator-function.src.js.shot | 234 - .../async-generator-method.src.js.shot | 660 -- .../generators/double-yield.src.js.shot | 378 - .../empty-generator-declaration.src.js.shot | 251 - .../generator-declaration.src.js.shot | 363 - .../generators/yield-delegation.src.js.shot | 362 - .../yield-without-value-in-call.src.js.shot | 420 - .../yield-without-value-no-semi.src.js.shot | 306 - .../yield-without-value.src.js.shot | 324 - .../return-identifier.src.js.shot | 119 - .../hexLiterals/lowercase.src.js.shot | 100 - .../hexLiterals/uppercase.src.js.shot | 100 - .../importMeta/simple-import-meta.src.js.shot | 252 - .../javascript/labels/label-break.src.js.shot | 410 - .../labels/label-continue.src.js.shot | 410 - .../modules/error-delete.src.js.shot | 307 - .../modules/error-function.src.js.shot | 310 - .../modules/error-strict.src.js.shot | 607 - .../export-async-named-function.src.js.shot | 255 - .../modules/export-const.src.js.shot | 235 - ...t-default-async-named-function.src.js.shot | 270 - .../modules/export-default-class.src.js.shot | 178 - .../export-default-function.src.js.shot | 214 - .../export-default-named-class.src.js.shot | 216 - .../export-default-named-function.src.js.shot | 252 - .../modules/export-default-object.src.js.shot | 270 - .../modules/export-default-value.src.js.shot | 138 - .../modules/export-from-default.src.js.shot | 254 - .../export-from-named-as-default.src.js.shot | 290 - ...export-from-named-as-specifier.src.js.shot | 290 - ...xport-from-named-as-specifiers.src.js.shot | 386 - .../modules/export-from-specifier.src.js.shot | 254 - .../export-from-specifiers.src.js.shot | 350 - .../modules/export-function.src.js.shot | 237 - .../javascript/modules/export-let.src.js.shot | 235 - .../export-named-as-default.src.js.shot | 236 - .../export-named-as-specifier.src.js.shot | 236 - .../export-named-as-specifiers.src.js.shot | 332 - .../modules/export-named-class.src.js.shot | 201 - .../export-named-specifier.src.js.shot | 200 - .../export-named-specifiers-comma.src.js.shot | 314 - .../export-named-specifiers.src.js.shot | 296 - .../export-var-anonymous-function.src.js.shot | 331 - .../modules/export-var-number.src.js.shot | 235 - .../javascript/modules/export-var.src.js.shot | 181 - ...t-default-and-named-specifiers.src.js.shot | 327 - ...fault-and-namespace-specifiers.src.js.shot | 305 - .../modules/import-default-as.src.js.shot | 289 - .../modules/import-default.src.js.shot | 195 - .../modules/import-jquery.src.js.shot | 177 - .../import-named-as-specifier.src.js.shot | 289 - .../import-named-as-specifiers.src.js.shot | 385 - .../import-named-specifier.src.js.shot | 253 - .../import-named-specifiers-comma.src.js.shot | 367 - .../import-named-specifiers.src.js.shot | 349 - .../import-namespace-specifier.src.js.shot | 231 - .../modules/import-null-as-nil.src.js.shot | 271 - .../modules/invalid-await.src.js.shot | 181 - .../modules/invalid-class.src.js.shot | 178 - .../invalid-export-named-default.src.js.shot | 182 - .../newTarget/invalid-new-target.src.js.shot | 272 - .../invalid-unknown-property.src.js.shot | 424 - .../newTarget/simple-new-target.src.js.shot | 444 - .../object-literal-in-lhs.src.js.shot | 364 - .../computed-addition-property.src.js.shot | 439 - .../computed-and-identifier.src.js.shot | 440 - .../computed-getter-and-setter.src.js.shot | 672 -- .../computed-string-property.src.js.shot | 366 - .../computed-variable-property.src.js.shot | 368 - ...alone-expression-with-addition.src.js.shot | 377 - ...ndalone-expression-with-method.src.js.shot | 402 - .../standalone-expression.src.js.shot | 306 - .../error-proto-property.src.js.shot | 727 -- .../error-proto-string-property.src.js.shot | 723 -- .../strict-duplicate-properties.src.js.shot | 537 - ...ct-duplicate-string-properties.src.js.shot | 533 - .../method-property.src.js.shot | 483 - .../simple-method-named-get.src.js.shot | 404 - .../simple-method-named-set.src.js.shot | 404 - .../simple-method-with-argument.src.js.shot | 444 - ...simple-method-with-string-name.src.js.shot | 402 - .../simple-method.src.js.shot | 404 - .../string-name-method-property.src.js.shot | 481 - .../shorthand-properties.src.js.shot | 763 -- .../octalLiterals/legacy.src.js.shot | 100 - .../octalLiterals/lowercase.src.js.shot | 100 - .../strict-uppercase.src.js.shot | 173 - .../octalLiterals/uppercase.src.js.shot | 100 - .../regex/regexp-simple.src.js.shot | 204 - .../regex-u-extended-escape.src.js.shot | 204 - ...egex-u-invalid-extended-escape.src.js.shot | 204 - .../regexUFlag/regex-u-simple.src.js.shot | 204 - .../regexYFlag/regexp-y-simple.src.js.shot | 204 - .../restParams/basic-rest.src.js.shot | 369 - .../restParams/class-constructor.src.js.shot | 421 - .../restParams/class-method.src.js.shot | 421 - .../restParams/error-no-default.src.js.shot | 335 - .../restParams/error-not-last.src.js.shot | 356 - .../func-expression-multi.src.js.shot | 428 - .../restParams/func-expression.src.js.shot | 371 - .../restParams/invalid-rest-param.src.js.shot | 413 - .../restParams/single-rest.src.js.shot | 312 - .../literal-float-negative.src.js.shot | 233 - .../simple-literals/literal-float.src.js.shot | 196 - .../simple-literals/literal-null.src.js.shot | 196 - .../literal-number-negative.src.js.shot | 233 - .../literal-number.src.js.shot | 196 - .../literal-string.src.js.shot | 196 - .../literal-undefined.src.js.shot | 198 - .../spread/complex-spread.src.js.shot | 1732 --- .../spread/multi-function-call.src.js.shot | 290 - .../spread/not-final-param.src.js.shot | 290 - .../spread/simple-function-call.src.js.shot | 233 - .../templateStrings/deeply-nested.src.js.shot | 472 - .../error-octal-literal.src.js.shot | Bin 2347 -> 0 bytes .../escape-characters.src.js.shot | 221 - .../templateStrings/expressions.src.js.shot | 693 -- .../multi-line-template-string.src.js.shot | 138 - .../simple-template-string.src.js.shot | 123 - .../single-dollar-sign.src.js.shot | 219 - .../tagged-no-placeholders.src.js.shot | 180 - .../tagged-template-string.src.js.shot | 758 -- .../ignored.src.js.shot | 1753 --- .../self-closing-tag-inside-tag.src.js.shot | 472 - .../test-content.src.js.shot | 318 - .../snapshots/jsx/attributes.src.js.shot | 682 -- .../jsx/element-keyword-name.src.js.shot | 810 -- .../jsx/embedded-comment.src.js.shot | 370 - .../jsx/embedded-conditional.src.js.shot | 667 -- ...embedded-invalid-js-identifier.src.js.shot | 447 - .../jsx/empty-placeholder.src.js.shot | 351 - .../jsx/escape-patterns-ignored.src.js.shot | 1055 -- .../jsx/escape-patterns-unknown.src.js.shot | 1722 --- .../jsx/escape-patterns-valid.src.js.shot | 541 - .../jsx/escape-patters-multi.src.js.shot | 427 - ...alid-namespace-value-with-dots.src.js.shot | 492 - .../jsx/japanese-characters.src.js.shot | 280 - .../jsx/less-than-operator.src.js.shot | 303 - .../jsx/member-expression-this.src.js.shot | 570 - .../jsx/member-expression.src.js.shot | 404 - .../jsx/multiple-blank-spaces.src.js.shot | 318 - .../jsx/namespace-this-name.src.js.shot | 227 - ...d-attribute-and-value-inserted.src.js.shot | 938 -- .../namespaced-name-and-attribute.src.js.shot | 317 - .../self-closing-tag-inside-tag.src.js.shot | 472 - .../jsx/self-closing-tag.src.js.shot | 192 - .../shorthand-fragment-with-child.src.js.shot | 317 - .../jsx/shorthand-fragment.src.js.shot | 187 - .../snapshots/jsx/spread-child.src.js.shot | 426 - ...ttribute-and-regular-attribute.src.js.shot | 411 - .../spread-operator-attributes.src.js.shot | 303 - .../jsx/tag-names-with-dots.src.js.shot | 422 - ...ag-names-with-multi-dots-multi.src.js.shot | 1714 --- .../jsx/tag-names-with-multi-dots.src.js.shot | 564 - .../snapshots/jsx/test-content.src.js.shot | 318 - ...ling-spread-operator-attribute.src.js.shot | 607 - .../tsx/generic-jsx-element.src.tsx.shot | 425 - .../generic-jsx-opening-element.src.tsx.shot | 513 - .../tsx/react-typed-props.src.tsx.shot | 1389 --- .../type-parameter-whitespace-loc.src.ts.shot | 312 - .../type-parameters.src.ts.shot | 416 - ...lass-with-abstract-constructor.src.ts.shot | 382 - ...act-class-with-abstract-method.src.ts.shot | 562 - ...class-with-abstract-properties.src.ts.shot | 456 - ...ith-abstract-readonly-property.src.ts.shot | 389 - ...th-abstract-static-constructor.src.ts.shot | 400 - ...-class-with-declare-properties.src.ts.shot | 1185 -- ...act-class-with-optional-method.src.ts.shot | 562 - ...act-class-with-override-method.src.ts.shot | 417 - ...t-class-with-override-property.src.ts.shot | 394 - .../basics/abstract-interface.src.ts.shot | 215 - ...-type-assertion-arrow-function.src.ts.shot | 548 - .../angle-bracket-type-assertion.src.ts.shot | 284 - ...nction-with-optional-parameter.src.ts.shot | 403 - ...-function-with-type-parameters.src.ts.shot | 606 - .../async-function-expression.src.ts.shot | 344 - ...-function-with-var-declaration.src.ts.shot | 724 -- .../await-without-async-function.src.ts.shot | 629 -- .../call-signatures-with-generics.src.ts.shot | 890 -- .../basics/call-signatures.src.ts.shot | 662 -- .../basics/cast-as-expression.src.ts.shot | 247 - .../basics/cast-as-multi-assign.src.ts.shot | 351 - .../basics/cast-as-multi.src.ts.shot | 264 - .../basics/cast-as-operator.src.ts.shot | 245 - .../basics/cast-as-simple.src.ts.shot | 268 - .../catch-clause-with-annotation.src.ts.shot | 673 -- ...clause-with-invalid-annotation.src.ts.shot | 350 - ...ss-multi-line-keyword-abstract.src.ts.shot | 219 - ...ass-multi-line-keyword-declare.src.ts.shot | 219 - ...field-with-accessibility-error.src.ts.shot | 616 -- ...entifier-field-with-annotation.src.ts.shot | 916 -- ...vate-identifier-readonly-field.src.ts.shot | 314 - .../basics/class-static-blocks.src.ts.shot | 727 -- ...s-with-accessibility-modifiers.src.ts.shot | 1416 --- ...-with-constructor-and-modifier.src.ts.shot | 591 - ...ameter-property-with-modifiers.src.ts.shot | 584 - ...roptery-with-override-modifier.src.ts.shot | 676 -- ...th-constructor-and-return-type.src.ts.shot | 693 -- ...onstructor-and-type-parameters.src.ts.shot | 783 -- .../class-with-declare-properties.src.ts.shot | 1547 --- ...class-with-definite-assignment.src.ts.shot | 335 - ...th-export-parameter-properties.src.ts.shot | 492 - ...ss-with-extends-and-implements.src.ts.shot | 294 - ...-with-extends-generic-multiple.src.ts.shot | 592 - .../class-with-extends-generic.src.ts.shot | 443 - ...ss-with-generic-method-default.src.ts.shot | 530 - .../class-with-generic-method.src.ts.shot | 456 - ...ss-with-implements-and-extends.src.ts.shot | 294 - ...th-implements-generic-multiple.src.ts.shot | 424 - .../class-with-implements-generic.src.ts.shot | 349 - .../basics/class-with-implements.src.ts.shot | 238 - .../basics/class-with-method.src.ts.shot | 883 -- .../class-with-mixin-reference.src.ts.shot | 628 -- .../basics/class-with-mixin.src.ts.shot | 2125 ---- ...-with-optional-computed-method.src.ts.shot | 3185 ------ ...ith-optional-computed-property.src.ts.shot | 374 - .../class-with-optional-methods.src.ts.shot | 805 -- ...class-with-optional-properties.src.ts.shot | 1999 ---- ...th-optional-property-undefined.src.ts.shot | 340 - .../class-with-override-method.src.ts.shot | 435 - .../class-with-override-property.src.ts.shot | 376 - ...with-private-optional-property.src.ts.shot | 709 -- ...h-private-parameter-properties.src.ts.shot | 1179 -- .../class-with-property-function.src.ts.shot | 896 -- .../class-with-property-values.src.ts.shot | 1204 -- ...protected-parameter-properties.src.ts.shot | 1179 -- ...th-public-parameter-properties.src.ts.shot | 1179 -- ...-readonly-parameter-properties.src.ts.shot | 734 -- .../class-with-readonly-property.src.ts.shot | 338 - ...th-static-parameter-properties.src.ts.shot | 492 - ...o-methods-computed-constructor.src.ts.shot | 954 -- ...ss-with-type-parameter-default.src.ts.shot | 350 - ...with-type-parameter-underscore.src.ts.shot | 276 - .../class-with-type-parameter.src.ts.shot | 276 - .../basics/const-assertions.src.ts.shot | 2244 ---- .../typescript/basics/const-enum.src.ts.shot | 347 - ...are-class-with-optional-method.src.ts.shot | 412 - .../basics/declare-function.src.ts.shot | 359 - ...estructuring-assignment-nested.src.ts.shot | 2303 ---- ...estructuring-assignment-object.src.ts.shot | 406 - ...tructuring-assignment-property.src.ts.shot | 508 - .../destructuring-assignment.src.ts.shot | 406 - .../basics/directive-in-module.src.ts.shot | 473 - .../basics/directive-in-namespace.src.ts.shot | 473 - ...-import-with-import-assertions.src.ts.shot | 494 - ...ort-all-with-import-assertions.src.ts.shot | 322 - .../basics/export-as-namespace.src.ts.shot | 155 - .../basics/export-assignment.src.ts.shot | 137 - ...xport-declare-const-named-enum.src.ts.shot | 404 - .../export-declare-named-enum.src.ts.shot | 386 - ...ort-default-class-with-generic.src.ts.shot | 292 - ...t-class-with-multiple-generics.src.ts.shot | 370 - .../export-default-interface.src.ts.shot | 402 - ...xport-named-class-with-generic.src.ts.shot | 315 - ...d-class-with-multiple-generics.src.ts.shot | 393 - ...ort-named-enum-computed-number.src.ts.shot | 290 - ...ort-named-enum-computed-string.src.ts.shot | 290 - ...rt-named-enum-computed-var-ref.src.ts.shot | 292 - .../basics/export-named-enum.src.ts.shot | 368 - .../basics/export-star-as-ns-from.src.ts.shot | 212 - .../basics/export-type-as.src.ts.shot | 254 - .../basics/export-type-from-as.src.ts.shot | 308 - .../basics/export-type-from.src.ts.shot | 272 - .../typescript/basics/export-type.src.ts.shot | 218 - .../export-with-import-assertions.src.ts.shot | 420 - ...-anonymus-with-type-parameters.src.ts.shot | 608 - ...tion-anynomus-with-return-type.src.ts.shot | 361 - .../basics/function-overloads.src.ts.shot | 1358 --- .../basics/function-with-await.src.ts.shot | 367 - ...-type-with-optional-properties.src.ts.shot | 779 -- ...object-type-without-annotation.src.ts.shot | 743 -- ...-parameters-that-have-comments.src.ts.shot | 331 - ...ype-parameters-with-constraint.src.ts.shot | 698 -- .../function-with-type-parameters.src.ts.shot | 627 -- ...unction-with-types-assignation.src.ts.shot | 946 -- .../basics/function-with-types.src.ts.shot | 469 - .../typescript/basics/global-this.src.ts.shot | 868 -- .../import-equal-declaration.src.ts.shot | 247 - .../import-equal-type-declaration.src.ts.shot | 265 - ...mport-export-equal-declaration.src.ts.shot | 265 - ...-export-equal-type-declaration.src.ts.shot | 283 - .../basics/import-type-default.src.ts.shot | 213 - .../basics/import-type-empty.src.ts.shot | 214 - .../basics/import-type-error.src.ts.shot | 345 - .../basics/import-type-named-as.src.ts.shot | 307 - .../basics/import-type-named.src.ts.shot | 367 - .../basics/import-type-star-as-ns.src.ts.shot | 249 - .../import-with-import-assertions.src.ts.shot | 361 - .../interface-extends-multiple.src.ts.shot | 309 - .../basics/interface-extends.src.ts.shot | 234 - .../interface-type-parameters.src.ts.shot | 272 - ...erface-with-all-property-types.src.ts.shot | 3196 ------ ...e-with-parameter-accessibility.src.ts.shot | 430 - ...with-extends-member-expression.src.ts.shot | 310 - ...e-with-extends-type-parameters.src.ts.shot | 459 - .../basics/interface-with-generic.src.ts.shot | 272 - .../basics/interface-with-jsdoc.src.ts.shot | 341 - .../basics/interface-with-method.src.ts.shot | 913 -- ...rface-with-optional-properties.src.ts.shot | 825 -- ...erface-without-type-annotation.src.ts.shot | 241 - .../basics/intrinsic-keyword.src.ts.shot | 1279 --- .../basics/keyof-operator.src.ts.shot | 232 - .../basics/keyword-variables.src.ts.shot | 9764 ----------------- .../basics/nested-type-arguments.src.ts.shot | 526 - .../basics/never-type-param.src.ts.shot | 618 -- ...-target-in-arrow-function-body.src.ts.shot | 350 - .../non-null-assertion-operator.src.ts.shot | 801 -- ...and-undefined-type-annotations.src.ts.shot | 395 - .../basics/nullish-coalescing.src.ts.shot | 606 - ...object-with-escaped-properties.src.ts.shot | 1101 -- .../object-with-typed-methods.src.ts.shot | 1838 ---- ...n-call-with-non-null-assertion.src.ts.shot | 2252 ---- ...ptional-chain-call-with-parens.src.ts.shot | 3113 ------ .../basics/optional-chain-call.src.ts.shot | 2772 ----- ...access-with-non-null-assertion.src.ts.shot | 2294 ---- ...ain-element-access-with-parens.src.ts.shot | 2618 ----- .../optional-chain-element-access.src.ts.shot | 2200 ---- ...-chain-with-non-null-assertion.src.ts.shot | 1235 --- .../optional-chain-with-parens.src.ts.shot | 2234 ---- .../basics/optional-chain.src.ts.shot | 1622 --- .../parenthesized-use-strict.src.ts.shot | 155 - .../basics/private-fields-in-in.src.ts.shot | 629 -- .../basics/readonly-arrays.src.ts.shot | 1766 --- .../basics/readonly-tuples.src.ts.shot | 1068 -- ...-circuiting-assignment-and-and.src.ts.shot | 177 - ...rt-circuiting-assignment-or-or.src.ts.shot | 177 - ...g-assignment-question-question.src.ts.shot | 177 - .../basics/symbol-type-param.src.ts.shot | 471 - ...claration-export-function-type.src.ts.shot | 412 - ...declaration-export-object-type.src.ts.shot | 366 - .../type-alias-declaration-export.src.ts.shot | 285 - ...ith-constrained-type-parameter.src.ts.shot | 568 - .../basics/type-alias-declaration.src.ts.shot | 497 - ...lias-object-without-annotation.src.ts.shot | 409 - ...pe-assertion-in-arrow-function.src.ts.shot | 529 - .../type-assertion-in-function.src.ts.shot | 454 - .../type-assertion-in-interface.src.ts.shot | 498 - .../type-assertion-in-method.src.ts.shot | 880 -- ...n-with-guard-in-arrow-function.src.ts.shot | 598 - ...sertion-with-guard-in-function.src.ts.shot | 523 - ...ertion-with-guard-in-interface.src.ts.shot | 567 - ...assertion-with-guard-in-method.src.ts.shot | 1018 -- .../type-guard-in-arrow-function.src.ts.shot | 728 -- .../basics/type-guard-in-function.src.ts.shot | 653 -- .../type-guard-in-interface.src.ts.shot | 549 - .../basics/type-guard-in-method.src.ts.shot | 1200 -- ...e-parameters-in-type-reference.src.ts.shot | 522 - .../basics/type-import-type.src.ts.shot | 708 -- .../type-only-export-specifiers.src.ts.shot | 386 - .../type-only-import-specifiers.src.ts.shot | 385 - ...e-parameters-comments-heritage.src.ts.shot | 2190 ---- .../type-parameters-comments.src.ts.shot | 1022 -- .../type-reference-comments.src.ts.shot | 521 - .../basics/typed-keyword-bigint.src.ts.shot | 156 - .../basics/typed-keyword-boolean.src.ts.shot | 156 - .../basics/typed-keyword-false.src.ts.shot | 175 - .../basics/typed-keyword-never.src.ts.shot | 156 - .../basics/typed-keyword-null.src.ts.shot | 156 - .../basics/typed-keyword-number.src.ts.shot | 156 - .../basics/typed-keyword-object.src.ts.shot | 156 - .../basics/typed-keyword-string.src.ts.shot | 156 - .../basics/typed-keyword-symbol.src.ts.shot | 156 - .../basics/typed-keyword-true.src.ts.shot | 175 - .../typed-keyword-undefined.src.ts.shot | 156 - .../basics/typed-keyword-unknown.src.ts.shot | 156 - .../basics/typed-keyword-void.src.ts.shot | 156 - .../basics/typed-method-signature.src.ts.shot | 930 -- .../typescript/basics/typed-this.src.ts.shot | 804 -- .../basics/union-intersection.src.ts.shot | 2109 ---- .../basics/unique-symbol.src.ts.shot | 210 - .../unknown-type-annotation.src.ts.shot | 211 - .../var-with-definite-assignment.src.ts.shot | 633 -- .../basics/var-with-dotted-type.src.ts.shot | 381 - .../basics/var-with-type.src.ts.shot | 503 - ...ration-type-annotation-spacing.src.ts.shot | 211 - .../declare/abstract-class.src.ts.shot | 198 - .../typescript/declare/class.src.ts.shot | 180 - .../typescript/declare/enum.src.ts.shot | 293 - .../typescript/declare/function.src.ts.shot | 232 - .../typescript/declare/interface.src.ts.shot | 176 - .../typescript/declare/module.src.ts.shot | 175 - .../typescript/declare/namespace.src.ts.shot | 175 - .../typescript/declare/type-alias.src.ts.shot | 174 - .../typescript/declare/variable.src.ts.shot | 229 - ...orator-factory-instance-member.src.ts.shot | 694 -- ...ecorator-factory-static-member.src.ts.shot | 846 -- ...ssor-decorator-instance-member.src.ts.shot | 600 - ...cessor-decorator-static-member.src.ts.shot | 716 -- .../class-decorator-factory.src.ts.shot | 483 - .../class-decorator.src.ts.shot | 237 - .../class-parameter-property.src.ts.shot | 567 - ...export-default-class-decorator.src.ts.shot | 291 - .../export-named-class-decorator.src.ts.shot | 276 - ...orator-factory-instance-member.src.ts.shot | 511 - ...ecorator-factory-static-member.src.ts.shot | 529 - ...thod-decorator-instance-member.src.ts.shot | 417 - ...method-decorator-static-member.src.ts.shot | 435 - ...ameter-array-pattern-decorator.src.ts.shot | 678 -- ...arameter-decorator-constructor.src.ts.shot | 943 -- ...ator-decorator-instance-member.src.ts.shot | 620 -- ...orator-decorator-static-member.src.ts.shot | 638 -- ...eter-decorator-instance-member.src.ts.shot | 765 -- ...ameter-decorator-static-member.src.ts.shot | 783 -- ...meter-object-pattern-decorator.src.ts.shot | 721 -- ...rameter-rest-element-decorator.src.ts.shot | 659 -- ...orator-factory-instance-member.src.ts.shot | 724 -- ...ecorator-factory-static-member.src.ts.shot | 707 -- ...erty-decorator-instance-member.src.ts.shot | 483 - ...operty-decorator-static-member.src.ts.shot | 519 - ...class-empty-extends-implements.src.ts.shot | 256 - .../class-empty-extends.src.ts.shot | 180 - ...class-extends-empty-implements.src.ts.shot | 236 - .../class-multiple-implements.src.ts.shot | 274 - .../decorator-on-enum-declaration.src.ts.shot | 176 - .../decorator-on-function.src.ts.shot | 234 - ...rator-on-interface-declaration.src.ts.shot | 230 - .../decorator-on-variable.src.ts.shot | 250 - ...e-arguments-in-call-expression.src.ts.shot | 211 - ...pe-arguments-in-new-expression.src.ts.shot | 210 - .../empty-type-arguments.src.ts.shot | 268 - ...e-parameters-in-arrow-function.src.ts.shot | 251 - ...type-parameters-in-constructor.src.ts.shot | 395 - ...ameters-in-function-expression.src.ts.shot | 327 - ...parameters-in-method-signature.src.ts.shot | 332 - ...mpty-type-parameters-in-method.src.ts.shot | 395 - .../empty-type-parameters.src.ts.shot | 251 - .../enum-with-keywords.src.ts.shot | 305 - .../index-signature-parameters.src.ts.shot | 557 - .../interface-empty-extends.src.ts.shot | 176 - .../interface-implements.src.ts.shot | 194 - ...terface-index-signature-export.src.ts.shot | 432 - ...erface-index-signature-private.src.ts.shot | 432 - ...face-index-signature-protected.src.ts.shot | 432 - ...terface-index-signature-public.src.ts.shot | 432 - ...terface-index-signature-static.src.ts.shot | 432 - .../interface-method-export.src.ts.shot | 475 - .../interface-method-private.src.ts.shot | 475 - .../interface-method-protected.src.ts.shot | 475 - .../interface-method-public.src.ts.shot | 475 - .../interface-method-readonly.src.ts.shot | 475 - .../interface-method-static.src.ts.shot | 475 - .../interface-multiple-extends.src.ts.shot | 309 - .../interface-property-export.src.ts.shot | 328 - .../interface-property-private.src.ts.shot | 328 - .../interface-property-protected.src.ts.shot | 328 - .../interface-property-public.src.ts.shot | 328 - .../interface-property-static.src.ts.shot | 328 - ...ce-property-with-default-value.src.ts.shot | 364 - ...-with-optional-index-signature.src.ts.shot | 432 - .../object-assertion-not-allowed.src.ts.shot | 329 - .../object-optional-not-allowed.src.ts.shot | 329 - .../errorRecovery/solo-const.src.ts.shot | 65 - ...call-expression-type-arguments.src.ts.shot | 489 - .../instantiation-expression.src.ts.shot | 2391 ---- .../new-expression-type-arguments.src.ts.shot | 382 - ...call-expression-type-arguments.src.ts.shot | 675 -- ...late-expression-type-arguments.src.ts.shot | 291 - ...module-declaration-with-import.src.ts.shot | 342 - ...mespace-with-exported-function.src.ts.shot | 640 -- .../global-module-declaration.src.ts.shot | 454 - .../module-with-default-exports.src.ts.shot | 859 -- .../nested-internal-module.src.ts.shot | 1511 --- ...and-ambient-module-declaration.src.ts.shot | 137 - .../typescript/types/array-type.src.ts.shot | 209 - .../conditional-infer-nested.src.ts.shot | 1350 --- .../conditional-infer-simple.src.ts.shot | 932 -- ...ditional-infer-with-constraint.src.ts.shot | 4267 ------- .../types/conditional-infer.src.ts.shot | 679 -- .../types/conditional-with-null.src.ts.shot | 387 - .../typescript/types/conditional.src.ts.shot | 387 - .../types/constructor-abstract.src.ts.shot | 338 - .../types/constructor-empty.src.ts.shot | 320 - .../types/constructor-generic.src.ts.shot | 587 - .../types/constructor-in-generic.src.ts.shot | 431 - .../types/constructor-with-rest.src.ts.shot | 521 - .../typescript/types/constructor.src.ts.shot | 573 - .../types/function-generic.src.ts.shot | 568 - .../types/function-in-generic.src.ts.shot | 412 - ...unction-with-array-destruction.src.ts.shot | 413 - ...nction-with-object-destruction.src.ts.shot | 456 - .../types/function-with-rest.src.ts.shot | 502 - .../types/function-with-this.src.ts.shot | 410 - .../typescript/types/function.src.ts.shot | 554 - .../index-signature-readonly.src.ts.shot | 449 - .../index-signature-without-type.src.ts.shot | 362 - .../types/index-signature.src.ts.shot | 431 - .../typescript/types/indexed.src.ts.shot | 343 - .../interface-with-accessors.src.ts.shot | 738 -- .../types/intersection-type.src.ts.shot | 668 -- .../types/literal-number-negative.src.ts.shot | 267 - .../types/literal-number.src.ts.shot | 230 - .../types/literal-string.src.ts.shot | 230 - .../types/mapped-named-type.src.ts.shot | 789 -- .../types/mapped-readonly-minus.src.ts.shot | 505 - .../types/mapped-readonly-plus.src.ts.shot | 523 - .../types/mapped-readonly.src.ts.shot | 487 - .../types/mapped-untypped.src.ts.shot | 399 - .../typescript/types/mapped.src.ts.shot | 451 - .../typescript/types/nested-types.src.ts.shot | 964 -- ...ct-literal-type-with-accessors.src.ts.shot | 773 -- .../optional-variance-in-and-out.src.ts.shot | 645 -- .../optional-variance-in-out.src.ts.shot | 567 - .../types/optional-variance-in.src.ts.shot | 527 - .../types/optional-variance-out.src.ts.shot | 418 - .../types/parenthesized-type.src.ts.shot | 264 - .../reference-generic-nested.src.ts.shot | 433 - .../types/reference-generic.src.ts.shot | 322 - .../typescript/types/reference.src.ts.shot | 233 - .../types/template-literal-type-1.src.ts.shot | 216 - .../types/template-literal-type-2.src.ts.shot | 294 - .../types/template-literal-type-3.src.ts.shot | 905 -- .../types/template-literal-type-4.src.ts.shot | 1475 --- .../types/this-type-expanded.src.ts.shot | 4234 ------- .../typescript/types/this-type.src.ts.shot | 500 - .../typescript/types/tuple-empty.src.ts.shot | 230 - .../types/tuple-named-optional.src.ts.shot | 723 -- .../types/tuple-named-rest.src.ts.shot | 539 - .../types/tuple-named-type.src.ts.shot | 432 - .../typescript/types/tuple-named.src.ts.shot | 597 - .../types/tuple-optional.src.ts.shot | 532 - .../typescript/types/tuple-rest.src.ts.shot | 389 - .../typescript/types/tuple-type.src.ts.shot | 299 - .../typescript/types/tuple.src.ts.shot | 372 - .../typescript/types/type-literal.src.ts.shot | 364 - .../types/type-operator.src.ts.shot | 489 - .../typescript/types/typeof-this.src.ts.shot | 541 - .../typeof-with-type-parameters.src.ts.shot | 436 - .../typescript/types/typeof.src.ts.shot | 325 - .../types/union-intersection.src.ts.shot | 1248 --- .../typescript/types/union-type.src.ts.shot | 228 - 798 files changed, 1 insertion(+), 420967 deletions(-) delete mode 100644 packages/typescript-estree/tests/snapshots/comments/block-trailing-comment.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/comment-within-condition.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/export-default-anonymous-class.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsdoc-comment.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsx-attr-and-text-with-url.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsx-block-comment.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsx-comment-after-jsx.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsx-comment-after-self-closing-jsx.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsx-generic-with-comment-in-tag.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsx-tag-comment-after-prop.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsx-tag-comments.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsx-text-with-multiline-non-comment.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsx-text-with-url.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsx-with-greather-than.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/jsx-with-operators.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/mix-line-and-block-comments.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/no-comment-regex.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/no-comment-template.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/surrounding-call-comments.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/surrounding-debugger-comments.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/surrounding-return-comments.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/surrounding-throw-comments.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/surrounding-while-loop-comments.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/switch-fallthrough-comment-in-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/switch-fallthrough-comment.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment-in-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment-in-nested-functions.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/template-string-block.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/comments/type-assertion-regression-test.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrayLiteral/array-literal-in-lhs.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrayLiteral/array-literals-in-binary-expr.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/as-param-with-params.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/as-param.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/basic-in-binary-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/basic.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/block-body-not-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/block-body.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-dup-params.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-default-param-eval.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-dup-params.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-eval-return.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-eval.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-octal.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-arguments.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-eval.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-names.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-two-lines.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/iife.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/multiple-params.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/no-auto-return.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-arguments.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-eval-params.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-eval.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-octal.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/return-arrow-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/return-sequence.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param-parens.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param-return-identifier.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/basics/and-operator-array-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/basics/delete-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/basics/do-while-statements.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/basics/identifiers-double-underscore.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/basics/instanceof.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/basics/new-with-member-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/basics/new-without-parens.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/basics/or-operator-array-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/basics/typeof-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/basics/update-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/basics/void-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/binary.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/decimal.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/hex.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/numeric-separator.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/octal.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/lowercase.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/uppercase.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/blockBindings/const.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/blockBindings/let-in-switchcase.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/blockBindings/let.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/callExpression/call-expression-with-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/callExpression/call-expression-with-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/callExpression/mixed-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/callExpression/new-expression-with-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/callExpression/new-expression-with-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-accessor-properties.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-computed-static-method.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-prototype.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-static.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-with-space.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method-super.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-accessor.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-field.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-method.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-prototype.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-static.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-static-methods-and-accessor-properties.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-two-computed-static-methods.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-computed-constructor.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-semi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-three-semi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-two-semi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-two-static-methods-named-constructor.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-parameters.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-with-space.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/derived-class-assign-to-var.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/derived-class-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/empty-class-double-semi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/empty-class-semi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/empty-class.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/empty-literal-derived-class.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-declaration.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-setter-declaration.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/named-class-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/named-derived-class-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-conditional.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-multi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-nested.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-return.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-simple-nested.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-simple.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-constructor.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-method.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/defaultParams/declaration.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/defaultParams/expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/defaultParams/method.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/defaultParams/not-all-params.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/array-const-undefined.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/array-let-undefined.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-const-named.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-const-undefined.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-let-named.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-let-undefined.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object-short.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-forOf/loop.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/complex-destructured.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/destructured-array-literal.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/destructuring-param.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/multi-destructured.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/not-final-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/single-destructured.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-complex-destructured.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-destructured-array-literal.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-multi-destructured.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-single-destructured.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/array-member.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/array-to-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/array-var-undefined.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/call-expression-destruction-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/call-expression-destruction-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-all.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-longform-nested-multi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-multi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-nested-all.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-nested-multi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-all.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-assign.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform-all.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform-multi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-mixed-multi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-multi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-nested-all.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-nested-multi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/destructured-array-catch.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/destructured-object-catch.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/invalid-defaults-object-assign.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/named-param.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/nested-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/nested-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/object-var-named.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/object-var-undefined.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-object-nested.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/params-array-wrapped.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/params-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/params-multi-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/params-nested-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/params-nested-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/params-object-wrapped.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/params-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/destructuring/sparse-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/directives/block.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/directives/directive-in-class.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/directives/first-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/directives/function-non-strict.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/directives/non-directive-string.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/directives/program-order.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/directives/program.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalAsyncIteration/async-generators.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalAsyncIteration/async-iterator.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalDynamicImport/dynamic-import.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/arg-spread.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/object-rest.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/property-spread.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-methods.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-properties.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/single-spread.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/two-spread.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/exponentiationOperators/exponential-operators.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/for/for-loop.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/for/for-with-coma.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/for/for-with-const.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/for/for-with-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/for/for-with-let.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-bare-nonstrict.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-destruction-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-destruction.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-object-with-body.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-assigment.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-bare-assigment.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-const.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-milti-asigment.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-rest.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-var.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-array.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-destruction-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-destruction.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-function-initializer.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-rest.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-var-and-braces.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-var-and-no-braces.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/function/return-multiline-sequence.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/function/return-sequence.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/generators/anonymous-generator.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-method.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/generators/double-yield.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/generators/empty-generator-declaration.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/generators/generator-declaration.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/generators/yield-delegation.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value-in-call.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value-no-semi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/globalReturn/return-identifier.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/hexLiterals/lowercase.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/hexLiterals/uppercase.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/importMeta/simple-import-meta.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/labels/label-break.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/labels/label-continue.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/error-delete.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/error-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/error-strict.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-async-named-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-const.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-default-async-named-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-default-class.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-default-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-default-named-class.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-default-named-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-default-object.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-default-value.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-from-default.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-default.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-specifier.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-specifiers.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-from-specifier.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-from-specifiers.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-let.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-default.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-specifier.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-specifiers.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-named-class.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifier.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifiers-comma.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifiers.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-var-anonymous-function.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-var-number.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/export-var.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-default-and-named-specifiers.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-default-and-namespace-specifiers.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-default-as.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-default.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-jquery.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-named-as-specifier.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-named-as-specifiers.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifier.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifiers-comma.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifiers.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-namespace-specifier.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/import-null-as-nil.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/invalid-await.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/invalid-class.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-default.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/newTarget/invalid-new-target.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/newTarget/invalid-unknown-property.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/newTarget/simple-new-target.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteral/object-literal-in-lhs.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-addition-property.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-string-property.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-variable-property.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/method-property.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/octalLiterals/legacy.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/octalLiterals/lowercase.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/octalLiterals/strict-uppercase.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/octalLiterals/uppercase.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/regex/regexp-simple.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-extended-escape.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-simple.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/regexYFlag/regexp-y-simple.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/restParams/basic-rest.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/restParams/class-constructor.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/restParams/class-method.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/restParams/error-no-default.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/restParams/error-not-last.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/restParams/func-expression-multi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/restParams/func-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/restParams/invalid-rest-param.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/restParams/single-rest.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-float-negative.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-float.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-null.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-number-negative.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-number.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-string.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-undefined.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/spread/complex-spread.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/spread/multi-function-call.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/spread/not-final-param.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/spread/simple-function-call.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/templateStrings/deeply-nested.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/templateStrings/error-octal-literal.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/templateStrings/escape-characters.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/templateStrings/expressions.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/templateStrings/multi-line-template-string.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/templateStrings/simple-template-string.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/templateStrings/single-dollar-sign.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/templateStrings/tagged-no-placeholders.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/templateStrings/tagged-template-string.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/ignored.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/test-content.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/attributes.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/element-keyword-name.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/embedded-comment.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/embedded-conditional.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/embedded-invalid-js-identifier.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/empty-placeholder.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/escape-patterns-ignored.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/escape-patterns-unknown.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/escape-patterns-valid.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/escape-patters-multi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-value-with-dots.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/japanese-characters.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/less-than-operator.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/member-expression-this.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/member-expression.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/multiple-blank-spaces.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/namespace-this-name.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/namespaced-name-and-attribute.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-inside-tag.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/self-closing-tag.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/shorthand-fragment-with-child.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/shorthand-fragment.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/spread-child.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/spread-operator-attribute-and-regular-attribute.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/spread-operator-attributes.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/tag-names-with-dots.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots-multi.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/test-content.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/jsx/trailing-spread-operator-attribute.src.js.shot delete mode 100644 packages/typescript-estree/tests/snapshots/tsx/generic-jsx-element.src.tsx.shot delete mode 100644 packages/typescript-estree/tests/snapshots/tsx/generic-jsx-opening-element.src.tsx.shot delete mode 100644 packages/typescript-estree/tests/snapshots/tsx/react-typed-props.src.tsx.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/babylon-convergence/type-parameters.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-constructor.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-static-constructor.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-optional-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-interface.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/angle-bracket-type-assertion-arrow-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/angle-bracket-type-assertion.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/arrow-function-with-optional-parameter.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/arrow-function-with-type-parameters.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/async-function-expression.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/async-function-with-var-declaration.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/await-without-async-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/call-signatures-with-generics.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/call-signatures.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-expression.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-multi-assign.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-multi.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-operator.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-simple.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/catch-clause-with-annotation.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/catch-clause-with-invalid-annotation.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-multi-line-keyword-abstract.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-multi-line-keyword-declare.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-annotation.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-readonly-field.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-modifier.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-return-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-type-parameters.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-and-implements.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-generic-multiple.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-generic.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method-default.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-and-extends.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-generic-multiple.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-generic.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-mixin-reference.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-mixin.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-methods.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-optional-property.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-two-methods-computed-constructor.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter-default.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter-underscore.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/const-assertions.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/const-enum.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/declare-class-with-optional-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/declare-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-nested.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-object.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-property.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/directive-in-module.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/directive-in-namespace.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/dynamic-import-with-import-assertions.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-all-with-import-assertions.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-as-namespace.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-assignment.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-declare-const-named-enum.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-declare-named-enum.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-default-class-with-generic.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-default-class-with-multiple-generics.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-default-interface.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-named-class-with-generic.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-named-class-with-multiple-generics.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-number.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-string.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-var-ref.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-star-as-ns-from.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-type-as.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-type-from-as.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-type-from.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/export-with-import-assertions.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/function-anonymus-with-type-parameters.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/function-anynomus-with-return-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/function-overloads.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/function-with-await.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/function-with-object-type-with-optional-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/function-with-object-type-without-annotation.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters-that-have-comments.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters-with-constraint.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/function-with-types-assignation.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/function-with-types.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/global-this.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-declaration.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-type-declaration.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-declaration.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-type-declaration.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-type-default.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-type-empty.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-type-error.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-type-named-as.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-type-named.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-type-star-as-ns.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-with-import-assertions.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-extends-multiple.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-extends.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-type-parameters.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-all-property-types.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-extends-member-expression.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-extends-type-parameters.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-generic.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-jsdoc.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-optional-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/interface-without-type-annotation.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/intrinsic-keyword.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/keyof-operator.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/keyword-variables.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/nested-type-arguments.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/never-type-param.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/new-target-in-arrow-function-body.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/non-null-assertion-operator.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/null-and-undefined-type-annotations.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/nullish-coalescing.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/object-with-typed-methods.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call-with-non-null-assertion.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call-with-parens.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access-with-non-null-assertion.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access-with-parens.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-with-non-null-assertion.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-with-parens.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/parenthesized-use-strict.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/private-fields-in-in.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/readonly-arrays.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/readonly-tuples.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-and-and.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-or-or.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-question-question.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/symbol-type-param.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export-function-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export-object-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-object-without-annotation.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-arrow-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-interface.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-arrow-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-interface.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-arrow-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-interface.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-import-type-with-type-parameters-in-type-reference.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-import-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-only-export-specifiers.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-only-import-specifiers.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-parameters-comments-heritage.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-parameters-comments.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-bigint.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-boolean.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-false.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-never.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-null.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-number.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-object.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-string.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-symbol.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-true.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-undefined.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-unknown.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-void.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-method-signature.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/typed-this.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/union-intersection.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/unique-symbol.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/unknown-type-annotation.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/var-with-definite-assignment.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/var-with-dotted-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/var-with-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/variable-declaration-type-annotation-spacing.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/declare/abstract-class.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/declare/class.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/declare/enum.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/declare/function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/declare/interface.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/declare/module.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/declare/namespace.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/declare/type-alias.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/declare/variable.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-decorator-factory.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-decorator.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-parameter-property.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/export-default-class-decorator.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/export-named-class-decorator.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-static-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-array-pattern-decorator.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-object-pattern-decorator.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-rest-element-decorator.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-empty-extends-implements.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-empty-extends.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-extends-empty-implements.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-multiple-implements.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-enum-declaration.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-interface-declaration.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-variable.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments-in-call-expression.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments-in-new-expression.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-arrow-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-constructor.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-function-expression.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method-signature.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/enum-with-keywords.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/index-signature-parameters.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-empty-extends.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-implements.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-export.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-private.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-protected.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-public.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-static.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-export.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-private.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-protected.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-public.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-readonly.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-static.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-multiple-extends.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-export.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-private.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-protected.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-public.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-static.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-with-default-value.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-with-optional-index-signature.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/object-assertion-not-allowed.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/object-optional-not-allowed.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/errorRecovery/solo-const.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/expressions/call-expression-type-arguments.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/expressions/instantiation-expression.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/expressions/new-expression-type-arguments.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/expressions/optional-call-expression-type-arguments.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/expressions/tagged-template-expression-type-arguments.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/global-module-declaration.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/module-with-default-exports.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/array-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-nested.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-simple.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-with-constraint.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/conditional-with-null.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/conditional.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/constructor-abstract.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/constructor-empty.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/constructor-generic.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/constructor-in-generic.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/constructor-with-rest.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/constructor.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/function-generic.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/function-in-generic.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/function-with-array-destruction.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/function-with-object-destruction.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/function-with-rest.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/function-with-this.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/function.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/index-signature-readonly.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/index-signature-without-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/index-signature.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/indexed.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/interface-with-accessors.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/intersection-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/literal-number-negative.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/literal-number.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/literal-string.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/mapped-named-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly-minus.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly-plus.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/mapped-untypped.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/mapped.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/nested-types.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/object-literal-type-with-accessors.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in-and-out.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in-out.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-out.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/parenthesized-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/reference-generic-nested.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/reference-generic.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/reference.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-1.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-2.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-3.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-4.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/this-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/tuple-empty.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-optional.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-rest.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/tuple-named.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/tuple-optional.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/tuple-rest.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/tuple-type.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/tuple.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/type-literal.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/type-operator.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/typeof-this.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/typeof-with-type-parameters.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/typeof.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/union-intersection.src.ts.shot delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/union-type.src.ts.shot diff --git a/packages/typescript-estree/jest.config.js b/packages/typescript-estree/jest.config.js index c7916ca935eb..f32706dc98f6 100644 --- a/packages/typescript-estree/jest.config.js +++ b/packages/typescript-estree/jest.config.js @@ -4,9 +4,5 @@ /** @type {import('@jest/types').Config.InitialOptions} */ module.exports = { ...require('../../jest.config.base.js'), - testRegex: [ - './tests/lib/.*\\.test\\.ts$', - './tests/ast-alignment/spec\\.ts$', - './tests/[^/]+\\.test\\.ts$', - ], + testRegex: ['./tests/lib/.*\\.test\\.ts$'], }; diff --git a/packages/typescript-estree/tests/snapshots/comments/block-trailing-comment.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/block-trailing-comment.src.js.shot deleted file mode 100644 index 79f989052431..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/block-trailing-comment.src.js.shot +++ /dev/null @@ -1,232 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments block-trailing-comment.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "BlockStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 15, - 24, - ], - "type": "Line", - "value": "comment", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/comment-within-condition.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/comment-within-condition.src.js.shot deleted file mode 100644 index e8d9e1190da1..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/comment-within-condition.src.js.shot +++ /dev/null @@ -1,229 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments comment-within-condition.src 1`] = ` -Object { - "body": Array [ - Object { - "alternate": null, - "consequent": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 10, - 30, - ], - "test": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "IfStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Block", - "value": " foo ", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 23, - ], - "type": "Block", - "value": " bar ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 10, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "Keyword", - "value": "if", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/export-default-anonymous-class.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/export-default-anonymous-class.src.js.shot deleted file mode 100644 index f53fbf24d7b9..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/export-default-anonymous-class.src.js.shot +++ /dev/null @@ -1,399 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments export-default-anonymous-class.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "name": "method1", - "optional": false, - "range": Array [ - 103, - 110, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 103, - 119, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 9, - }, - "start": Object { - "column": 13, - "line": 8, - }, - }, - "range": Array [ - 112, - 119, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "params": Array [], - "range": Array [ - 110, - 119, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "range": Array [ - 57, - 121, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": null, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 51, - 121, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 36, - 121, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "type": "Block", - "value": "* - * this is anonymous class. - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 63, - 98, - ], - "type": "Block", - "value": "* - * this is method1. - ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 11, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 36, - 122, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 43, - 50, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 51, - 56, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 103, - 110, - ], - "type": "Identifier", - "value": "method1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 8, - }, - "start": Object { - "column": 12, - "line": 8, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 13, - "line": 8, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 118, - 119, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 10, - }, - }, - "range": Array [ - 120, - 121, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsdoc-comment.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsdoc-comment.src.js.shot deleted file mode 100644 index 89327f903b6f..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsdoc-comment.src.js.shot +++ /dev/null @@ -1,354 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsdoc-comment.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 130, - 133, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 123, - 134, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 117, - 136, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 108, - 111, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 112, - 115, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 99, - 136, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 98, - ], - "type": "Block", - "value": "* - * This is a function. - * @param {String} bar some string - * @returns {String} returns bar - ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 99, - 137, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 99, - 107, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 108, - 111, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 112, - 115, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 115, - 116, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 123, - 129, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 130, - 133, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "range": Array [ - 133, - 134, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 135, - 136, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-attr-and-text-with-url.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-attr-and-text-with-url.src.js.shot deleted file mode 100644 index 0dd1ca45457b..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-attr-and-text-with-url.src.js.shot +++ /dev/null @@ -1,559 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsx-attr-and-text-with-url.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "link", - "optional": false, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 61, - ], - "raw": "http://example.com", - "type": "JSXText", - "value": "http://example.com", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 63, - 64, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 61, - 65, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 65, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "href", - "range": Array [ - 17, - 21, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 17, - 42, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 42, - ], - "raw": "\\"http://example.com\\"", - "type": "Literal", - "value": "http://example.com", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 15, - 16, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 14, - 43, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 14, - 65, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 66, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 66, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 67, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 67, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 68, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "value": "link", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "JSXIdentifier", - "value": "href", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 42, - ], - "type": "JSXText", - "value": "\\"http://example.com\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 61, - ], - "type": "JSXText", - "value": "http://example.com", - }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 63, - "line": 1, - }, - "start": Object { - "column": 62, - "line": 1, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 1, - }, - "start": Object { - "column": 64, - "line": 1, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 66, - "line": 1, - }, - "start": Object { - "column": 65, - "line": 1, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 67, - "line": 1, - }, - "start": Object { - "column": 66, - "line": 1, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-block-comment.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-block-comment.src.js.shot deleted file mode 100644 index 76bf409f37b4..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-block-comment.src.js.shot +++ /dev/null @@ -1,750 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsx-block-comment.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "pure", - "optional": false, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 47, - 60, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 61, - 72, - ], - "type": "JSXEmptyExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 60, - 73, - ], - "type": "JSXExpressionContainer", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 73, - 82, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "name": "Foo", - "range": Array [ - 84, - 87, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 82, - 88, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "Foo", - "range": Array [ - 43, - 46, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 42, - 47, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 42, - 88, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 95, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 97, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 13, - 97, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 97, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 97, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 61, - 72, - ], - "type": "Block", - "value": "COMMENT", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 98, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "value": "pure", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 43, - 46, - ], - "type": "JSXIdentifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 47, - 60, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 73, - 82, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 84, - 87, - ], - "type": "JSXIdentifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 87, - 88, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 93, - 94, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-comment-after-jsx.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-comment-after-jsx.src.js.shot deleted file mode 100644 index 1976fe78dcb8..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-comment-after-jsx.src.js.shot +++ /dev/null @@ -1,599 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsx-comment-after-jsx.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "pure", - "optional": false, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "Foo", - "range": Array [ - 49, - 52, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 47, - 53, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "Foo", - "range": Array [ - 43, - 46, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 42, - 47, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 42, - 53, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 67, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 69, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 13, - 69, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 69, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 69, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 54, - 60, - ], - "type": "Line", - "value": " Foo", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 70, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "value": "pure", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 43, - 46, - ], - "type": "JSXIdentifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 49, - 52, - ], - "type": "JSXIdentifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-comment-after-self-closing-jsx.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-comment-after-self-closing-jsx.src.js.shot deleted file mode 100644 index 72fdcdbea639..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-comment-after-self-closing-jsx.src.js.shot +++ /dev/null @@ -1,511 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsx-comment-after-self-closing-jsx.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "pure", - "optional": false, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "Foo", - "range": Array [ - 43, - 46, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 42, - 49, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 42, - 49, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 63, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 65, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 13, - 65, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 65, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 65, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 50, - 56, - ], - "type": "Line", - "value": " Foo", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 66, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "value": "pure", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 43, - 46, - ], - "type": "JSXIdentifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-generic-with-comment-in-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-generic-with-comment-in-tag.src.js.shot deleted file mode 100644 index ea6c181c416e..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-generic-with-comment-in-tag.src.js.shot +++ /dev/null @@ -1,3732 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsx-generic-with-comment-in-tag.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "comp", - "optional": false, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 24, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 40, - "line": 3, - }, - }, - "name": "Component", - "range": Array [ - 60, - 69, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 58, - 70, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 50, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "Component", - "range": Array [ - 25, - 34, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 24, - 58, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 34, - 42, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "range": Array [ - 24, - 70, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 50, - "line": 3, - }, - }, - "range": Array [ - 70, - 75, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 4, - }, - "start": Object { - "column": 42, - "line": 4, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 4, - }, - "start": Object { - "column": 44, - "line": 4, - }, - }, - "name": "Component", - "range": Array [ - 115, - 124, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 113, - 125, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 54, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "name": "foo", - "range": Array [ - 94, - 97, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 94, - 97, - ], - "type": "JSXAttribute", - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "name": "Component", - "range": Array [ - 76, - 85, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 75, - 113, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 86, - 92, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 85, - 93, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "range": Array [ - 75, - 125, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 54, - "line": 4, - }, - }, - "range": Array [ - 125, - 130, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 42, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 5, - }, - "start": Object { - "column": 44, - "line": 5, - }, - }, - "name": "Component", - "range": Array [ - 170, - 179, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 168, - 180, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 5, - }, - "start": Object { - "column": 38, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 5, - }, - "start": Object { - "column": 38, - "line": 5, - }, - }, - "name": "bar", - "range": Array [ - 164, - 167, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 164, - 167, - ], - "type": "JSXAttribute", - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 42, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "name": "Component", - "range": Array [ - 131, - 140, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 130, - 168, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 141, - 147, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 140, - 148, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "range": Array [ - 130, - 180, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 6, - }, - "start": Object { - "column": 54, - "line": 5, - }, - }, - "range": Array [ - 180, - 185, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 6, - }, - "start": Object { - "column": 46, - "line": 6, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 6, - }, - "start": Object { - "column": 48, - "line": 6, - }, - }, - "name": "Component", - "range": Array [ - 229, - 238, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 227, - 239, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 58, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 204, - 207, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 204, - 207, - ], - "type": "JSXAttribute", - "value": null, - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 6, - }, - "start": Object { - "column": 42, - "line": 6, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 6, - }, - "start": Object { - "column": 42, - "line": 6, - }, - }, - "name": "bar", - "range": Array [ - 223, - 226, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 223, - 226, - ], - "type": "JSXAttribute", - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 46, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "name": "Component", - "range": Array [ - 186, - 195, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 185, - 227, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 15, - "line": 6, - }, - }, - "range": Array [ - 196, - 202, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 195, - 203, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "range": Array [ - 185, - 239, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 8, - }, - "start": Object { - "column": 58, - "line": 6, - }, - }, - "range": Array [ - 239, - 245, - ], - "raw": " - - ", - "type": "JSXText", - "value": " - - ", - }, - Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 10, - }, - "start": Object { - "column": 5, - "line": 10, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 10, - }, - "start": Object { - "column": 7, - "line": 10, - }, - }, - "name": "Component", - "range": Array [ - 289, - 298, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 287, - 299, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 5, - "line": 8, - }, - }, - "name": "Component", - "range": Array [ - 246, - 255, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 245, - 287, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 8, - }, - "start": Object { - "column": 14, - "line": 8, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "range": Array [ - 256, - 262, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 255, - 263, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "range": Array [ - 245, - 299, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 11, - }, - "start": Object { - "column": 17, - "line": 10, - }, - }, - "range": Array [ - 299, - 304, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 14, - }, - "start": Object { - "column": 5, - "line": 14, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 14, - }, - "start": Object { - "column": 7, - "line": 14, - }, - }, - "name": "Component", - "range": Array [ - 358, - 367, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 356, - 368, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 12, - }, - "start": Object { - "column": 6, - "line": 12, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 12, - }, - "start": Object { - "column": 6, - "line": 12, - }, - }, - "name": "foo", - "range": Array [ - 329, - 332, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 329, - 332, - ], - "type": "JSXAttribute", - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 11, - }, - "start": Object { - "column": 5, - "line": 11, - }, - }, - "name": "Component", - "range": Array [ - 305, - 314, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 304, - 356, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 11, - }, - "start": Object { - "column": 14, - "line": 11, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 11, - }, - "start": Object { - "column": 15, - "line": 11, - }, - }, - "range": Array [ - 315, - 321, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 314, - 322, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "range": Array [ - 304, - 368, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 15, - }, - "start": Object { - "column": 17, - "line": 14, - }, - }, - "range": Array [ - 368, - 373, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 18, - }, - "start": Object { - "column": 5, - "line": 18, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 18, - }, - "start": Object { - "column": 7, - "line": 18, - }, - }, - "name": "Component", - "range": Array [ - 427, - 436, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 425, - 437, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 18, - }, - "start": Object { - "column": 4, - "line": 15, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 17, - }, - "start": Object { - "column": 6, - "line": 17, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 17, - }, - "start": Object { - "column": 6, - "line": 17, - }, - }, - "name": "foo", - "range": Array [ - 416, - 419, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 416, - 419, - ], - "type": "JSXAttribute", - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 18, - }, - "start": Object { - "column": 4, - "line": 15, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 15, - }, - "start": Object { - "column": 5, - "line": 15, - }, - }, - "name": "Component", - "range": Array [ - 374, - 383, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 373, - 425, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 15, - }, - "start": Object { - "column": 14, - "line": 15, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 15, - }, - "start": Object { - "column": 15, - "line": 15, - }, - }, - "range": Array [ - 384, - 390, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 383, - 391, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "range": Array [ - 373, - 437, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 19, - }, - "start": Object { - "column": 17, - "line": 18, - }, - }, - "range": Array [ - 437, - 442, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 23, - }, - "start": Object { - "column": 5, - "line": 23, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 23, - }, - "start": Object { - "column": 7, - "line": 23, - }, - }, - "name": "Component", - "range": Array [ - 506, - 515, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 504, - 516, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 23, - }, - "start": Object { - "column": 4, - "line": 19, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 20, - }, - "start": Object { - "column": 6, - "line": 20, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 20, - }, - "start": Object { - "column": 6, - "line": 20, - }, - }, - "name": "foo", - "range": Array [ - 467, - 470, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 467, - 470, - ], - "type": "JSXAttribute", - "value": null, - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 22, - }, - "start": Object { - "column": 6, - "line": 22, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 22, - }, - "start": Object { - "column": 6, - "line": 22, - }, - }, - "name": "bar", - "range": Array [ - 495, - 498, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 495, - 498, - ], - "type": "JSXAttribute", - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 23, - }, - "start": Object { - "column": 4, - "line": 19, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 19, - }, - "start": Object { - "column": 5, - "line": 19, - }, - }, - "name": "Component", - "range": Array [ - 443, - 452, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 442, - 504, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 19, - }, - "start": Object { - "column": 14, - "line": 19, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 19, - }, - "start": Object { - "column": 15, - "line": 19, - }, - }, - "range": Array [ - 453, - 459, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 452, - 460, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "range": Array [ - 442, - 516, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 24, - }, - "start": Object { - "column": 17, - "line": 23, - }, - }, - "range": Array [ - 516, - 519, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - ], - "closingFragment": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 24, - }, - "start": Object { - "column": 2, - "line": 24, - }, - }, - "range": Array [ - 519, - 522, - ], - "type": "JSXClosingFragment", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 24, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "openingFragment": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "JSXOpeningFragment", - }, - "range": Array [ - 17, - 522, - ], - "type": "JSXFragment", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 25, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 524, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 2, - "line": 25, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 525, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 43, - 57, - ], - "type": "Block", - "value": " comment1 ", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 98, - 112, - ], - "type": "Block", - "value": " comment2 ", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 5, - }, - "start": Object { - "column": 23, - "line": 5, - }, - }, - "range": Array [ - 149, - 163, - ], - "type": "Block", - "value": " comment3 ", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 6, - }, - "start": Object { - "column": 27, - "line": 6, - }, - }, - "range": Array [ - 208, - 222, - ], - "type": "Block", - "value": " comment4 ", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 9, - }, - }, - "range": Array [ - 270, - 281, - ], - "type": "Line", - "value": " comment5", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 13, - }, - "start": Object { - "column": 6, - "line": 13, - }, - }, - "range": Array [ - 339, - 350, - ], - "type": "Line", - "value": " comment6", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 16, - }, - "start": Object { - "column": 6, - "line": 16, - }, - }, - "range": Array [ - 398, - 409, - ], - "type": "Line", - "value": " comment7", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 21, - }, - "start": Object { - "column": 6, - "line": 21, - }, - }, - "range": Array [ - 477, - 488, - ], - "type": "Line", - "value": " comment8", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 26, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 526, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "value": "comp", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 25, - 34, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 37, - "line": 3, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 3, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 40, - "line": 3, - }, - }, - "range": Array [ - 60, - 69, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 3, - }, - "start": Object { - "column": 49, - "line": 3, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 50, - "line": 3, - }, - }, - "range": Array [ - 70, - 75, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 76, - 85, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 86, - 92, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 94, - 97, - ], - "type": "JSXIdentifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 41, - "line": 4, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 4, - }, - "start": Object { - "column": 42, - "line": 4, - }, - }, - "range": Array [ - 113, - 114, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 4, - }, - "start": Object { - "column": 43, - "line": 4, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 4, - }, - "start": Object { - "column": 44, - "line": 4, - }, - }, - "range": Array [ - 115, - 124, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 4, - }, - "start": Object { - "column": 53, - "line": 4, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 54, - "line": 4, - }, - }, - "range": Array [ - 125, - 130, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 130, - 131, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 131, - 140, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 140, - 141, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 141, - 147, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, - }, - }, - "range": Array [ - 147, - 148, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 5, - }, - "start": Object { - "column": 38, - "line": 5, - }, - }, - "range": Array [ - 164, - 167, - ], - "type": "JSXIdentifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 5, - }, - "start": Object { - "column": 41, - "line": 5, - }, - }, - "range": Array [ - 167, - 168, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 5, - }, - "start": Object { - "column": 42, - "line": 5, - }, - }, - "range": Array [ - 168, - 169, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 5, - }, - "start": Object { - "column": 43, - "line": 5, - }, - }, - "range": Array [ - 169, - 170, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 5, - }, - "start": Object { - "column": 44, - "line": 5, - }, - }, - "range": Array [ - 170, - 179, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 53, - "line": 5, - }, - }, - "range": Array [ - 179, - 180, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 6, - }, - "start": Object { - "column": 54, - "line": 5, - }, - }, - "range": Array [ - 180, - 185, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 185, - 186, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "range": Array [ - 186, - 195, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 195, - 196, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 15, - "line": 6, - }, - }, - "range": Array [ - 196, - 202, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 21, - "line": 6, - }, - }, - "range": Array [ - 202, - 203, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "range": Array [ - 204, - 207, - ], - "type": "JSXIdentifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 6, - }, - "start": Object { - "column": 42, - "line": 6, - }, - }, - "range": Array [ - 223, - 226, - ], - "type": "JSXIdentifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 6, - }, - "start": Object { - "column": 45, - "line": 6, - }, - }, - "range": Array [ - 226, - 227, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 6, - }, - "start": Object { - "column": 46, - "line": 6, - }, - }, - "range": Array [ - 227, - 228, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 6, - }, - "start": Object { - "column": 47, - "line": 6, - }, - }, - "range": Array [ - 228, - 229, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 6, - }, - "start": Object { - "column": 48, - "line": 6, - }, - }, - "range": Array [ - 229, - 238, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 6, - }, - "start": Object { - "column": 57, - "line": 6, - }, - }, - "range": Array [ - 238, - 239, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 8, - }, - "start": Object { - "column": 58, - "line": 6, - }, - }, - "range": Array [ - 239, - 245, - ], - "type": "JSXText", - "value": " - - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 245, - 246, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 5, - "line": 8, - }, - }, - "range": Array [ - 246, - 255, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 14, - "line": 8, - }, - }, - "range": Array [ - 255, - 256, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "range": Array [ - 256, - 262, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 8, - }, - "start": Object { - "column": 21, - "line": 8, - }, - }, - "range": Array [ - 262, - 263, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "range": Array [ - 286, - 287, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 10, - }, - "start": Object { - "column": 5, - "line": 10, - }, - }, - "range": Array [ - 287, - 288, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 10, - }, - "start": Object { - "column": 6, - "line": 10, - }, - }, - "range": Array [ - 288, - 289, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 10, - }, - "start": Object { - "column": 7, - "line": 10, - }, - }, - "range": Array [ - 289, - 298, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 10, - }, - "start": Object { - "column": 16, - "line": 10, - }, - }, - "range": Array [ - 298, - 299, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 11, - }, - "start": Object { - "column": 17, - "line": 10, - }, - }, - "range": Array [ - 299, - 304, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "range": Array [ - 304, - 305, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 11, - }, - "start": Object { - "column": 5, - "line": 11, - }, - }, - "range": Array [ - 305, - 314, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 11, - }, - "start": Object { - "column": 14, - "line": 11, - }, - }, - "range": Array [ - 314, - 315, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 11, - }, - "start": Object { - "column": 15, - "line": 11, - }, - }, - "range": Array [ - 315, - 321, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 11, - }, - "start": Object { - "column": 21, - "line": 11, - }, - }, - "range": Array [ - 321, - 322, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 12, - }, - "start": Object { - "column": 6, - "line": 12, - }, - }, - "range": Array [ - 329, - 332, - ], - "type": "JSXIdentifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 14, - }, - }, - "range": Array [ - 355, - 356, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 14, - }, - "start": Object { - "column": 5, - "line": 14, - }, - }, - "range": Array [ - 356, - 357, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 14, - }, - "start": Object { - "column": 6, - "line": 14, - }, - }, - "range": Array [ - 357, - 358, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 14, - }, - "start": Object { - "column": 7, - "line": 14, - }, - }, - "range": Array [ - 358, - 367, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 14, - }, - "start": Object { - "column": 16, - "line": 14, - }, - }, - "range": Array [ - 367, - 368, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 15, - }, - "start": Object { - "column": 17, - "line": 14, - }, - }, - "range": Array [ - 368, - 373, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 15, - }, - "start": Object { - "column": 4, - "line": 15, - }, - }, - "range": Array [ - 373, - 374, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 15, - }, - "start": Object { - "column": 5, - "line": 15, - }, - }, - "range": Array [ - 374, - 383, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 15, - }, - "start": Object { - "column": 14, - "line": 15, - }, - }, - "range": Array [ - 383, - 384, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 15, - }, - "start": Object { - "column": 15, - "line": 15, - }, - }, - "range": Array [ - 384, - 390, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 15, - }, - "start": Object { - "column": 21, - "line": 15, - }, - }, - "range": Array [ - 390, - 391, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 17, - }, - "start": Object { - "column": 6, - "line": 17, - }, - }, - "range": Array [ - 416, - 419, - ], - "type": "JSXIdentifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 18, - }, - "start": Object { - "column": 4, - "line": 18, - }, - }, - "range": Array [ - 424, - 425, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 18, - }, - "start": Object { - "column": 5, - "line": 18, - }, - }, - "range": Array [ - 425, - 426, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 18, - }, - "start": Object { - "column": 6, - "line": 18, - }, - }, - "range": Array [ - 426, - 427, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 18, - }, - "start": Object { - "column": 7, - "line": 18, - }, - }, - "range": Array [ - 427, - 436, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 18, - }, - "start": Object { - "column": 16, - "line": 18, - }, - }, - "range": Array [ - 436, - 437, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 19, - }, - "start": Object { - "column": 17, - "line": 18, - }, - }, - "range": Array [ - 437, - 442, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 19, - }, - "start": Object { - "column": 4, - "line": 19, - }, - }, - "range": Array [ - 442, - 443, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 19, - }, - "start": Object { - "column": 5, - "line": 19, - }, - }, - "range": Array [ - 443, - 452, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 19, - }, - "start": Object { - "column": 14, - "line": 19, - }, - }, - "range": Array [ - 452, - 453, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 19, - }, - "start": Object { - "column": 15, - "line": 19, - }, - }, - "range": Array [ - 453, - 459, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 19, - }, - "start": Object { - "column": 21, - "line": 19, - }, - }, - "range": Array [ - 459, - 460, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 20, - }, - "start": Object { - "column": 6, - "line": 20, - }, - }, - "range": Array [ - 467, - 470, - ], - "type": "JSXIdentifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 22, - }, - "start": Object { - "column": 6, - "line": 22, - }, - }, - "range": Array [ - 495, - 498, - ], - "type": "JSXIdentifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 23, - }, - "start": Object { - "column": 4, - "line": 23, - }, - }, - "range": Array [ - 503, - 504, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 23, - }, - "start": Object { - "column": 5, - "line": 23, - }, - }, - "range": Array [ - 504, - 505, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 23, - }, - "start": Object { - "column": 6, - "line": 23, - }, - }, - "range": Array [ - 505, - 506, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 23, - }, - "start": Object { - "column": 7, - "line": 23, - }, - }, - "range": Array [ - 506, - 515, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 23, - }, - "start": Object { - "column": 16, - "line": 23, - }, - }, - "range": Array [ - 515, - 516, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 24, - }, - "start": Object { - "column": 17, - "line": 23, - }, - }, - "range": Array [ - 516, - 519, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 24, - }, - "start": Object { - "column": 2, - "line": 24, - }, - }, - "range": Array [ - 519, - 520, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 24, - }, - "start": Object { - "column": 3, - "line": 24, - }, - }, - "range": Array [ - 520, - 521, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 24, - }, - "start": Object { - "column": 4, - "line": 24, - }, - }, - "range": Array [ - 521, - 522, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 25, - }, - "start": Object { - "column": 0, - "line": 25, - }, - }, - "range": Array [ - 523, - 524, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 25, - }, - "start": Object { - "column": 1, - "line": 25, - }, - }, - "range": Array [ - 524, - 525, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-tag-comment-after-prop.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-tag-comment-after-prop.src.js.shot deleted file mode 100644 index 9cc61ef5262c..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-tag-comment-after-prop.src.js.shot +++ /dev/null @@ -1,799 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsx-tag-comment-after-prop.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "pure", - "optional": false, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "name": "foo", - "range": Array [ - 66, - 69, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 66, - 75, - ], - "type": "JSXAttribute", - "value": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 71, - 74, - ], - "raw": "123", - "type": "Literal", - "value": 123, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 70, - 75, - ], - "type": "JSXExpressionContainer", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "name": "bar", - "range": Array [ - 99, - 102, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 99, - 109, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 103, - 109, - ], - "raw": "\\"woof\\"", - "type": "Literal", - "value": "woof", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "name": "Foo", - "range": Array [ - 39, - 42, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 38, - 118, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 38, - 118, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 23, - 123, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 125, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 13, - 125, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 125, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 125, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 51, - 57, - ], - "type": "Line", - "value": " one", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 84, - 90, - ], - "type": "Line", - "value": " two", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 127, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "value": "pure", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "JSXIdentifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 66, - 69, - ], - "type": "JSXIdentifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 71, - 74, - ], - "type": "Numeric", - "value": "123", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 99, - 102, - ], - "type": "JSXIdentifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 103, - 109, - ], - "type": "JSXText", - "value": "\\"woof\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 8, - }, - }, - "range": Array [ - 116, - 117, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 121, - 122, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 9, - }, - "start": Object { - "column": 3, - "line": 9, - }, - }, - "range": Array [ - 122, - 123, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 10, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-tag-comments.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-tag-comments.src.js.shot deleted file mode 100644 index 7f900cacc432..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-tag-comments.src.js.shot +++ /dev/null @@ -1,658 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsx-tag-comments.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "pure", - "optional": false, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 103, - 112, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "name": "Foo", - "range": Array [ - 114, - 117, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 112, - 118, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "Foo", - "range": Array [ - 43, - 46, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 42, - 103, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 42, - 118, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 125, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 127, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 13, - 127, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 127, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 127, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 59, - 68, - ], - "type": "Line", - "value": " single", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 81, - 92, - ], - "type": "Block", - "value": " block ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 11, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 129, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "value": "pure", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 43, - 46, - ], - "type": "JSXIdentifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 103, - 112, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "range": Array [ - 113, - 114, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 114, - 117, - ], - "type": "JSXIdentifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 7, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 123, - 124, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 8, - }, - "start": Object { - "column": 5, - "line": 8, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 126, - 127, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-multiline-non-comment.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-multiline-non-comment.src.js.shot deleted file mode 100644 index 39839405cec1..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-multiline-non-comment.src.js.shot +++ /dev/null @@ -1,630 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsx-text-with-multiline-non-comment.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "pure", - "optional": false, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 41, - 80, - ], - "raw": " - /** - * test - */ - ", - "type": "JSXText", - "value": " - /** - * test - */ - ", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "name": "Foo", - "range": Array [ - 82, - 85, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 80, - 86, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "Foo", - "range": Array [ - 37, - 40, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 36, - 41, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 36, - 86, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 23, - 91, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 93, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 13, - 93, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 93, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 93, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 94, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "value": "pure", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 37, - 40, - ], - "type": "JSXIdentifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 41, - 80, - ], - "type": "JSXText", - "value": " - /** - * test - */ - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 82, - 85, - ], - "type": "JSXIdentifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 8, - }, - "start": Object { - "column": 3, - "line": 8, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-url.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-url.src.js.shot deleted file mode 100644 index cf4fda8c7c85..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-url.src.js.shot +++ /dev/null @@ -1,2303 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsx-text-with-url.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "first", - "optional": false, - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 37, - ], - "raw": "http://example.com", - "type": "JSXText", - "value": "http://example.com", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 39, - 42, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 37, - 43, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 15, - 18, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 14, - 19, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 14, - 43, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 43, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "second", - "optional": false, - "range": Array [ - 52, - 58, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 63, - 81, - ], - "raw": "http://example.com", - "type": "JSXText", - "value": "http://example.com", - }, - ], - "closingFragment": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 35, - "line": 3, - }, - }, - "range": Array [ - 81, - 84, - ], - "type": "JSXClosingFragment", - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "openingFragment": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 61, - 63, - ], - "type": "JSXOpeningFragment", - }, - "range": Array [ - 61, - 84, - ], - "type": "JSXFragment", - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 52, - 84, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 46, - 85, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "name": "third", - "optional": false, - "range": Array [ - 93, - 98, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "children": Array [ - Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "name": "br", - "range": Array [ - 107, - 109, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 106, - 112, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 106, - 112, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 5, - }, - "start": Object { - "column": 25, - "line": 5, - }, - }, - "range": Array [ - 112, - 130, - ], - "raw": "http://example.com", - "type": "JSXText", - "value": "http://example.com", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 43, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 5, - }, - "start": Object { - "column": 45, - "line": 5, - }, - }, - "name": "div", - "range": Array [ - 132, - 135, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 130, - 136, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "name": "div", - "range": Array [ - 102, - 105, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 101, - 106, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 101, - 136, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 93, - 136, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 50, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 87, - 137, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "name": "fourth", - "optional": false, - "range": Array [ - 145, - 151, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "children": Array [ - Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 7, - }, - "start": Object { - "column": 26, - "line": 7, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 28, - "line": 7, - }, - }, - "name": "span", - "range": Array [ - 167, - 171, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 165, - 172, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 7, - }, - "start": Object { - "column": 21, - "line": 7, - }, - }, - "name": "span", - "range": Array [ - 160, - 164, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 159, - 165, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 159, - 172, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 7, - }, - "start": Object { - "column": 33, - "line": 7, - }, - }, - "range": Array [ - 172, - 190, - ], - "raw": "http://example.com", - "type": "JSXText", - "value": "http://example.com", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 7, - }, - "start": Object { - "column": 51, - "line": 7, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 7, - }, - "start": Object { - "column": 53, - "line": 7, - }, - }, - "name": "div", - "range": Array [ - 192, - 195, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 190, - 196, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 57, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 7, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 7, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 7, - }, - }, - "name": "div", - "range": Array [ - 155, - 158, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 154, - 159, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 154, - 196, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 57, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 145, - 196, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 58, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 139, - 197, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 9, - }, - }, - "name": "fifth", - "optional": false, - "range": Array [ - 205, - 210, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "children": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 9, - }, - "start": Object { - "column": 20, - "line": 9, - }, - }, - "range": Array [ - 219, - 219, - ], - "type": "JSXEmptyExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "range": Array [ - 218, - 220, - ], - "type": "JSXExpressionContainer", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 9, - }, - "start": Object { - "column": 21, - "line": 9, - }, - }, - "range": Array [ - 220, - 238, - ], - "raw": "http://example.com", - "type": "JSXText", - "value": "http://example.com", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 39, - "line": 9, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 9, - }, - "start": Object { - "column": 41, - "line": 9, - }, - }, - "name": "div", - "range": Array [ - 240, - 243, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 238, - 244, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 14, - "line": 9, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 14, - "line": 9, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 15, - "line": 9, - }, - }, - "name": "div", - "range": Array [ - 214, - 217, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 213, - 218, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 213, - 244, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 9, - }, - }, - "range": Array [ - 205, - 244, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 46, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 199, - 245, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 246, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - "value": "first", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 37, - ], - "type": "JSXText", - "value": "http://example.com", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 46, - 51, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 52, - 58, - ], - "type": "Identifier", - "value": "second", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 63, - 81, - ], - "type": "JSXText", - "value": "http://example.com", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 35, - "line": 3, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 37, - "line": 3, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 87, - 92, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 93, - 98, - ], - "type": "Identifier", - "value": "third", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 99, - 100, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 101, - 102, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 102, - 105, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "range": Array [ - 107, - 109, - ], - "type": "JSXIdentifier", - "value": "br", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 23, - "line": 5, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 24, - "line": 5, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 5, - }, - "start": Object { - "column": 25, - "line": 5, - }, - }, - "range": Array [ - 112, - 130, - ], - "type": "JSXText", - "value": "http://example.com", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 5, - }, - "start": Object { - "column": 43, - "line": 5, - }, - }, - "range": Array [ - 130, - 131, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 5, - }, - "start": Object { - "column": 44, - "line": 5, - }, - }, - "range": Array [ - 131, - 132, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 5, - }, - "start": Object { - "column": 45, - "line": 5, - }, - }, - "range": Array [ - 132, - 135, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 48, - "line": 5, - }, - }, - "range": Array [ - 135, - 136, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 5, - }, - "start": Object { - "column": 49, - "line": 5, - }, - }, - "range": Array [ - 136, - 137, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 139, - 144, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 145, - 151, - ], - "type": "Identifier", - "value": "fourth", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 7, - }, - }, - "range": Array [ - 152, - 153, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 7, - }, - }, - "range": Array [ - 154, - 155, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 7, - }, - }, - "range": Array [ - 155, - 158, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 19, - "line": 7, - }, - }, - "range": Array [ - 158, - 159, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "range": Array [ - 159, - 160, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 7, - }, - "start": Object { - "column": 21, - "line": 7, - }, - }, - "range": Array [ - 160, - 164, - ], - "type": "JSXIdentifier", - "value": "span", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 7, - }, - "start": Object { - "column": 25, - "line": 7, - }, - }, - "range": Array [ - 164, - 165, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 7, - }, - "start": Object { - "column": 26, - "line": 7, - }, - }, - "range": Array [ - 165, - 166, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 7, - }, - "start": Object { - "column": 27, - "line": 7, - }, - }, - "range": Array [ - 166, - 167, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 28, - "line": 7, - }, - }, - "range": Array [ - 167, - 171, - ], - "type": "JSXIdentifier", - "value": "span", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 7, - }, - "start": Object { - "column": 32, - "line": 7, - }, - }, - "range": Array [ - 171, - 172, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 7, - }, - "start": Object { - "column": 33, - "line": 7, - }, - }, - "range": Array [ - 172, - 190, - ], - "type": "JSXText", - "value": "http://example.com", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 7, - }, - "start": Object { - "column": 51, - "line": 7, - }, - }, - "range": Array [ - 190, - 191, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 7, - }, - "start": Object { - "column": 52, - "line": 7, - }, - }, - "range": Array [ - 191, - 192, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 7, - }, - "start": Object { - "column": 53, - "line": 7, - }, - }, - "range": Array [ - 192, - 195, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 7, - }, - "start": Object { - "column": 56, - "line": 7, - }, - }, - "range": Array [ - 195, - 196, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 7, - }, - "start": Object { - "column": 57, - "line": 7, - }, - }, - "range": Array [ - 196, - 197, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 199, - 204, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 9, - }, - }, - "range": Array [ - 205, - 210, - ], - "type": "Identifier", - "value": "fifth", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "range": Array [ - 211, - 212, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 9, - }, - "start": Object { - "column": 14, - "line": 9, - }, - }, - "range": Array [ - 213, - 214, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 15, - "line": 9, - }, - }, - "range": Array [ - 214, - 217, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 18, - "line": 9, - }, - }, - "range": Array [ - 217, - 218, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "range": Array [ - 218, - 219, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 9, - }, - "start": Object { - "column": 20, - "line": 9, - }, - }, - "range": Array [ - 219, - 220, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 9, - }, - "start": Object { - "column": 21, - "line": 9, - }, - }, - "range": Array [ - 220, - 238, - ], - "type": "JSXText", - "value": "http://example.com", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 9, - }, - "start": Object { - "column": 39, - "line": 9, - }, - }, - "range": Array [ - 238, - 239, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 40, - "line": 9, - }, - }, - "range": Array [ - 239, - 240, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 9, - }, - "start": Object { - "column": 41, - "line": 9, - }, - }, - "range": Array [ - 240, - 243, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 44, - "line": 9, - }, - }, - "range": Array [ - 243, - 244, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 9, - }, - "start": Object { - "column": 45, - "line": 9, - }, - }, - "range": Array [ - 244, - 245, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-with-greather-than.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-with-greather-than.src.js.shot deleted file mode 100644 index 5259bfe57ae4..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-with-greather-than.src.js.shot +++ /dev/null @@ -1,894 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsx-with-greather-than.src 1`] = ` -Object { - "body": Array [ - Object { - "alternate": null, - "consequent": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "operator": ">>", - "range": Array [ - 30, - 36, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "BinaryExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 24, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 24, - 37, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 24, - 38, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 59, - 61, - ], - "raw": "//", - "type": "JSXText", - "value": "//", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "name": "test", - "range": Array [ - 63, - 67, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 61, - 68, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "test", - "range": Array [ - 54, - 58, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 53, - 59, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 53, - 68, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 47, - 68, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 41, - 68, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 70, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 70, - ], - "test": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "operator": ">", - "range": Array [ - 4, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "type": "BinaryExpression", - }, - "type": "IfStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 17, - ], - "type": "Block", - "value": " Test ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 71, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 2, - ], - "type": "Keyword", - "value": "if", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 24, - 28, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 32, - 34, - ], - "type": "Punctuator", - "value": ">>", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 41, - 46, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 54, - 58, - ], - "type": "JSXIdentifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 59, - 61, - ], - "type": "JSXText", - "value": "//", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 63, - 67, - ], - "type": "JSXIdentifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-with-operators.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-with-operators.src.js.shot deleted file mode 100644 index 450afc1e8066..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-with-operators.src.js.shot +++ /dev/null @@ -1,894 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments jsx-with-operators.src 1`] = ` -Object { - "body": Array [ - Object { - "alternate": null, - "consequent": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "operator": ">>", - "range": Array [ - 30, - 36, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "BinaryExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 24, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 24, - 37, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 24, - 38, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 59, - 61, - ], - "raw": "//", - "type": "JSXText", - "value": "//", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "name": "test", - "range": Array [ - 63, - 67, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 61, - 68, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "test", - "range": Array [ - 54, - 58, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 53, - 59, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 53, - 68, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 47, - 68, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 41, - 68, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 70, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 70, - ], - "test": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "operator": "<", - "range": Array [ - 4, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "type": "BinaryExpression", - }, - "type": "IfStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 17, - ], - "type": "Block", - "value": " Test ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 71, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 2, - ], - "type": "Keyword", - "value": "if", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 24, - 28, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 32, - 34, - ], - "type": "Punctuator", - "value": ">>", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 41, - 46, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 54, - 58, - ], - "type": "JSXIdentifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 59, - 61, - ], - "type": "JSXText", - "value": "//", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 63, - 67, - ], - "type": "JSXIdentifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/mix-line-and-block-comments.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/mix-line-and-block-comments.src.js.shot deleted file mode 100644 index 5966397a09f1..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/mix-line-and-block-comments.src.js.shot +++ /dev/null @@ -1,251 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments mix-line-and-block-comments.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "zzz", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 24, - 27, - ], - "raw": "777", - "type": "Literal", - "value": 777, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 27, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 6, - 28, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Line", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Block", - "value": "aaa", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "Line", - "value": "bar", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 6, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "zzz", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "Numeric", - "value": "777", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/no-comment-regex.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/no-comment-regex.src.js.shot deleted file mode 100644 index 140681a1d949..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/no-comment-regex.src.js.shot +++ /dev/null @@ -1,204 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments no-comment-regex.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "regex", - "optional": false, - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 33, - ], - "raw": "/no comment\\\\/**foo/", - "regex": Object { - "flags": "", - "pattern": "no comment\\\\/**foo", - }, - "type": "Literal", - "value": null, - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 33, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - "value": "regex", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 33, - ], - "regex": Object { - "flags": "", - "pattern": "no comment\\\\/**foo", - }, - "type": "RegularExpression", - "value": "/no comment\\\\/**foo/", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/no-comment-template.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/no-comment-template.src.js.shot deleted file mode 100644 index 5f56111360cb..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/no-comment-template.src.js.shot +++ /dev/null @@ -1,299 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments no-comment-template.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "str", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expressions": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "__dirname", - "optional": false, - "range": Array [ - 15, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": "", - "raw": "", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 36, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "/test/*.js", - "raw": "/test/*.js", - }, - }, - ], - "range": Array [ - 12, - 36, - ], - "type": "TemplateLiteral", - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 36, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "str", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Template", - "value": "\`\${", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 24, - ], - "type": "Identifier", - "value": "__dirname", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 36, - ], - "type": "Template", - "value": "}/test/*.js\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/surrounding-call-comments.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/surrounding-call-comments.src.js.shot deleted file mode 100644 index 4bc091f11c9d..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/surrounding-call-comments.src.js.shot +++ /dev/null @@ -1,367 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments surrounding-call-comments.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 36, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 36, - 41, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 60, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 60, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 31, - ], - "type": "Block", - "value": " before ", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 47, - 58, - ], - "type": "Block", - "value": " after ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 61, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 39, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/surrounding-debugger-comments.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/surrounding-debugger-comments.src.js.shot deleted file mode 100644 index b4a4fd0d2eb8..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/surrounding-debugger-comments.src.js.shot +++ /dev/null @@ -1,289 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments surrounding-debugger-comments.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 45, - ], - "type": "DebuggerStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 63, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 63, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 31, - ], - "type": "Block", - "value": " before ", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 50, - 61, - ], - "type": "Block", - "value": " after ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 64, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 44, - ], - "type": "Keyword", - "value": "debugger", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/surrounding-return-comments.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/surrounding-return-comments.src.js.shot deleted file mode 100644 index 2b489829d215..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/surrounding-return-comments.src.js.shot +++ /dev/null @@ -1,290 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments surrounding-return-comments.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 43, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 61, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 61, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 31, - ], - "type": "Block", - "value": " before ", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 48, - 59, - ], - "type": "Block", - "value": " after ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 62, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/surrounding-throw-comments.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/surrounding-throw-comments.src.js.shot deleted file mode 100644 index 4c7ece7aa12a..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/surrounding-throw-comments.src.js.shot +++ /dev/null @@ -1,326 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments surrounding-throw-comments.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 42, - 44, - ], - "raw": "55", - "type": "Literal", - "value": 55, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 45, - ], - "type": "ThrowStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 63, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 63, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 31, - ], - "type": "Block", - "value": " before ", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 50, - 61, - ], - "type": "Block", - "value": " after ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 64, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 41, - ], - "type": "Keyword", - "value": "throw", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 42, - 44, - ], - "type": "Numeric", - "value": "55", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/surrounding-while-loop-comments.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/surrounding-while-loop-comments.src.js.shot deleted file mode 100644 index 37f5b7aa1f8b..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/surrounding-while-loop-comments.src.js.shot +++ /dev/null @@ -1,513 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments surrounding-while-loop-comments.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 46, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 46, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 41, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - "type": "WhileStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 65, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "name": "each", - "optional": false, - "range": Array [ - 61, - 65, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 65, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "range": Array [ - 61, - 65, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 66, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 66, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 68, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 68, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 68, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 68, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 29, - ], - "type": "Block", - "value": " infinite ", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 56, - ], - "type": "Block", - "value": " bar ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 69, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 35, - ], - "type": "Keyword", - "value": "while", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 41, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 60, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 60, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "range": Array [ - 61, - 65, - ], - "type": "Identifier", - "value": "each", - }, - Object { - "loc": Object { - "end": Object { - "column": 66, - "line": 1, - }, - "start": Object { - "column": 65, - "line": 1, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 68, - "line": 1, - }, - "start": Object { - "column": 67, - "line": 1, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/switch-fallthrough-comment-in-function.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/switch-fallthrough-comment-in-function.src.js.shot deleted file mode 100644 index 18abdc0cf22a..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/switch-fallthrough-comment-in-function.src.js.shot +++ /dev/null @@ -1,738 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments switch-fallthrough-comment-in-function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "cases": Array [ - Object { - "consequent": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 61, - 68, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 66, - 67, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "SwitchCase", - }, - Object { - "consequent": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "name": "doIt", - "optional": false, - "range": Array [ - 126, - 130, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "optional": false, - "range": Array [ - 126, - 132, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 126, - 133, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 106, - 133, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 111, - 112, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "type": "SwitchCase", - }, - ], - "discriminant": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 24, - 139, - ], - "type": "SwitchStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 141, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 141, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "Line", - "value": " foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 81, - 97, - ], - "type": "Line", - "value": " falls through", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 142, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "Keyword", - "value": "switch", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 61, - 65, - ], - "type": "Keyword", - "value": "case", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 106, - 110, - ], - "type": "Keyword", - "value": "case", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 126, - 130, - ], - "type": "Identifier", - "value": "doIt", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 7, - }, - }, - "range": Array [ - 130, - 131, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 131, - 132, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 18, - "line": 7, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 138, - 139, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 140, - 141, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/switch-fallthrough-comment.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/switch-fallthrough-comment.src.js.shot deleted file mode 100644 index b24e17d04474..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/switch-fallthrough-comment.src.js.shot +++ /dev/null @@ -1,526 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments switch-fallthrough-comment.src 1`] = ` -Object { - "body": Array [ - Object { - "cases": Array [ - Object { - "consequent": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 29, - 36, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "SwitchCase", - }, - Object { - "consequent": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "name": "doIt", - "optional": false, - "range": Array [ - 82, - 86, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "optional": false, - "range": Array [ - 82, - 88, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 82, - 89, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 66, - 89, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 71, - 72, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "type": "SwitchCase", - }, - ], - "discriminant": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 91, - ], - "type": "SwitchStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "Line", - "value": " foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 45, - 61, - ], - "type": "Line", - "value": " falls through", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 92, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "switch", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 29, - 33, - ], - "type": "Keyword", - "value": "case", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 66, - 70, - ], - "type": "Keyword", - "value": "case", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 82, - 86, - ], - "type": "Identifier", - "value": "doIt", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 87, - 88, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment-in-function.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment-in-function.src.js.shot deleted file mode 100644 index 87d736c4f0e8..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment-in-function.src.js.shot +++ /dev/null @@ -1,698 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments switch-no-default-comment-in-function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "cases": Array [ - Object { - "consequent": Array [ - Object { - "label": null, - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 63, - 69, - ], - "type": "BreakStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 43, - 69, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "type": "SwitchCase", - }, - Object { - "consequent": Array [ - Object { - "label": null, - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 98, - 104, - ], - "type": "BreakStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 78, - 104, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 83, - 84, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "SwitchCase", - }, - ], - "discriminant": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 131, - ], - "type": "SwitchStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 133, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 133, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 113, - 125, - ], - "type": "Line", - "value": "no default", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 134, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Keyword", - "value": "switch", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 43, - 47, - ], - "type": "Keyword", - "value": "case", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 63, - 68, - ], - "type": "Keyword", - "value": "break", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 78, - 82, - ], - "type": "Keyword", - "value": "case", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 98, - 103, - ], - "type": "Keyword", - "value": "break", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 130, - 131, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment-in-nested-functions.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment-in-nested-functions.src.js.shot deleted file mode 100644 index 9614231c22cc..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment-in-nested-functions.src.js.shot +++ /dev/null @@ -1,1608 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments switch-no-default-comment-in-nested-functions.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "module", - "optional": false, - "range": Array [ - 0, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "exports", - "optional": false, - "range": Array [ - 7, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 0, - 14, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 286, - ], - "right": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "cases": Array [ - Object { - "consequent": Array [ - Object { - "argument": Object { - "arguments": Array [ - Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 79, - "line": 6, - }, - "start": Object { - "column": 34, - "line": 6, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 50, - "line": 6, - }, - "start": Object { - "column": 34, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 6, - }, - "start": Object { - "column": 34, - "line": 6, - }, - }, - "name": "node", - "optional": false, - "range": Array [ - 172, - 176, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 50, - "line": 6, - }, - "start": Object { - "column": 39, - "line": 6, - }, - }, - "name": "expressions", - "optional": false, - "range": Array [ - 177, - 188, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 172, - 188, - ], - "type": "MemberExpression", - }, - "optional": false, - "property": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 74, - "line": 6, - }, - "start": Object { - "column": 51, - "line": 6, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 67, - "line": 6, - }, - "start": Object { - "column": 51, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 55, - "line": 6, - }, - "start": Object { - "column": 51, - "line": 6, - }, - }, - "name": "node", - "optional": false, - "range": Array [ - 189, - 193, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 67, - "line": 6, - }, - "start": Object { - "column": 56, - "line": 6, - }, - }, - "name": "expressions", - "optional": false, - "range": Array [ - 194, - 205, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 189, - 205, - ], - "type": "MemberExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 74, - "line": 6, - }, - "start": Object { - "column": 68, - "line": 6, - }, - }, - "name": "length", - "optional": false, - "range": Array [ - 206, - 212, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 189, - 212, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 78, - "line": 6, - }, - "start": Object { - "column": 51, - "line": 6, - }, - }, - "operator": "-", - "range": Array [ - 189, - 216, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 78, - "line": 6, - }, - "start": Object { - "column": 77, - "line": 6, - }, - }, - "range": Array [ - 215, - 216, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "BinaryExpression", - }, - "range": Array [ - 172, - 217, - ], - "type": "MemberExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "name": "isConstant", - "optional": false, - "range": Array [ - 161, - 171, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 80, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "optional": false, - "range": Array [ - 161, - 218, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 81, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 154, - 219, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 81, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 111, - 219, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 116, - 136, - ], - "raw": "\\"SequenceExpression\\"", - "type": "Literal", - "value": "SequenceExpression", - }, - "type": "SwitchCase", - }, - ], - "discriminant": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "name": "node", - "optional": false, - "range": Array [ - 86, - 90, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "name": "type", - "optional": false, - "range": Array [ - 91, - 95, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 86, - 95, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 78, - 255, - ], - "type": "SwitchStatement", - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 9, - }, - "start": Object { - "column": 15, - "line": 9, - }, - }, - "range": Array [ - 271, - 276, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "range": Array [ - 264, - 277, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 68, - 283, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": "isConstant", - "optional": false, - "range": Array [ - 51, - 61, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "name": "node", - "optional": false, - "range": Array [ - 62, - 66, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 42, - 283, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 286, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "context", - "optional": false, - "range": Array [ - 26, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 17, - 286, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 287, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 232, - 245, - ], - "type": "Line", - "value": " no default", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 288, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Identifier", - "value": "exports", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 33, - ], - "type": "Identifier", - "value": "context", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 42, - 50, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 51, - 61, - ], - "type": "Identifier", - "value": "isConstant", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 62, - 66, - ], - "type": "Identifier", - "value": "node", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 78, - 84, - ], - "type": "Keyword", - "value": "switch", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 86, - 90, - ], - "type": "Identifier", - "value": "node", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 4, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "range": Array [ - 91, - 95, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 111, - 115, - ], - "type": "Keyword", - "value": "case", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 116, - 136, - ], - "type": "String", - "value": "\\"SequenceExpression\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "range": Array [ - 136, - 137, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 154, - 160, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "range": Array [ - 161, - 171, - ], - "type": "Identifier", - "value": "isConstant", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 6, - }, - "start": Object { - "column": 33, - "line": 6, - }, - }, - "range": Array [ - 171, - 172, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 6, - }, - "start": Object { - "column": 34, - "line": 6, - }, - }, - "range": Array [ - 172, - 176, - ], - "type": "Identifier", - "value": "node", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 6, - }, - "start": Object { - "column": 38, - "line": 6, - }, - }, - "range": Array [ - 176, - 177, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 6, - }, - "start": Object { - "column": 39, - "line": 6, - }, - }, - "range": Array [ - 177, - 188, - ], - "type": "Identifier", - "value": "expressions", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 6, - }, - "start": Object { - "column": 50, - "line": 6, - }, - }, - "range": Array [ - 188, - 189, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 6, - }, - "start": Object { - "column": 51, - "line": 6, - }, - }, - "range": Array [ - 189, - 193, - ], - "type": "Identifier", - "value": "node", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 6, - }, - "start": Object { - "column": 55, - "line": 6, - }, - }, - "range": Array [ - 193, - 194, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 67, - "line": 6, - }, - "start": Object { - "column": 56, - "line": 6, - }, - }, - "range": Array [ - 194, - 205, - ], - "type": "Identifier", - "value": "expressions", - }, - Object { - "loc": Object { - "end": Object { - "column": 68, - "line": 6, - }, - "start": Object { - "column": 67, - "line": 6, - }, - }, - "range": Array [ - 205, - 206, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 6, - }, - "start": Object { - "column": 68, - "line": 6, - }, - }, - "range": Array [ - 206, - 212, - ], - "type": "Identifier", - "value": "length", - }, - Object { - "loc": Object { - "end": Object { - "column": 76, - "line": 6, - }, - "start": Object { - "column": 75, - "line": 6, - }, - }, - "range": Array [ - 213, - 214, - ], - "type": "Punctuator", - "value": "-", - }, - Object { - "loc": Object { - "end": Object { - "column": 78, - "line": 6, - }, - "start": Object { - "column": 77, - "line": 6, - }, - }, - "range": Array [ - 215, - 216, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 6, - }, - "start": Object { - "column": 78, - "line": 6, - }, - }, - "range": Array [ - 216, - 217, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 80, - "line": 6, - }, - "start": Object { - "column": 79, - "line": 6, - }, - }, - "range": Array [ - 217, - 218, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 81, - "line": 6, - }, - "start": Object { - "column": 80, - "line": 6, - }, - }, - "range": Array [ - 218, - 219, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 254, - 255, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "range": Array [ - 264, - 270, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 9, - }, - "start": Object { - "column": 15, - "line": 9, - }, - }, - "range": Array [ - 271, - 276, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 9, - }, - "start": Object { - "column": 20, - "line": 9, - }, - }, - "range": Array [ - 276, - 277, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "range": Array [ - 282, - 283, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 12, - }, - }, - "range": Array [ - 285, - 286, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 12, - }, - "start": Object { - "column": 1, - "line": 12, - }, - }, - "range": Array [ - 286, - 287, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment.src.js.shot deleted file mode 100644 index 53613d3d8d9b..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/switch-no-default-comment.src.js.shot +++ /dev/null @@ -1,340 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments switch-no-default-comment.src 1`] = ` -Object { - "body": Array [ - Object { - "cases": Array [ - Object { - "consequent": Array [ - Object { - "label": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 33, - 39, - ], - "type": "BreakStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 39, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "SwitchCase", - }, - ], - "discriminant": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 58, - ], - "type": "SwitchStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 44, - 56, - ], - "type": "Line", - "value": "no default", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 59, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "switch", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Keyword", - "value": "case", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 33, - 38, - ], - "type": "Keyword", - "value": "break", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/template-string-block.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/template-string-block.src.js.shot deleted file mode 100644 index 7239d1f6e538..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/template-string-block.src.js.shot +++ /dev/null @@ -1,423 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments template-string-block.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expressions": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 3, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": "", - "raw": "", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "", - "raw": "", - }, - }, - ], - "range": Array [ - 0, - 9, - ], - "type": "TemplateLiteral", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "type": "ExpressionStatement", - }, - Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "operator": "+", - "range": Array [ - 56, - 61, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 56, - 62, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 11, - 64, - ], - "type": "BlockStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 17, - 51, - ], - "type": "Block", - "value": " TODO comment comment comment ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 65, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Template", - "value": "\`\${", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 7, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Template", - "value": "}\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/comments/type-assertion-regression-test.src.ts.shot b/packages/typescript-estree/tests/snapshots/comments/type-assertion-regression-test.src.ts.shot deleted file mode 100644 index f3145c864a8c..000000000000 --- a/packages/typescript-estree/tests/snapshots/comments/type-assertion-regression-test.src.ts.shot +++ /dev/null @@ -1,327 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments type-assertion-regression-test.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 28, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 31, - ], - "type": "TSTypeAssertion", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 31, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 25, - ], - "type": "Line", - "value": " test", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrayLiteral/array-literal-in-lhs.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrayLiteral/array-literal-in-lhs.src.js.shot deleted file mode 100644 index 554c83a56e09..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrayLiteral/array-literal-in-lhs.src.js.shot +++ /dev/null @@ -1,364 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrayLiteral array-literal-in-lhs.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "object": Object { - "arguments": Array [ - Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 5, - ], - "type": "ArrayExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 0, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 6, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 0, - 8, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 14, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "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": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrayLiteral/array-literals-in-binary-expr.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrayLiteral/array-literals-in-binary-expr.src.js.shot deleted file mode 100644 index d88642ceb62d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrayLiteral/array-literals-in-binary-expr.src.js.shot +++ /dev/null @@ -1,207 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrayLiteral array-literals-in-binary-expr.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 2, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "+", - "range": Array [ - 0, - 7, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 7, - ], - "type": "ArrayExpression", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/as-param-with-params.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/as-param-with-params.src.js.shot deleted file mode 100644 index 998c55131ccc..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/as-param-with-params.src.js.shot +++ /dev/null @@ -1,388 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions as-param-with-params.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 4, - 16, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 17, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/as-param.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/as-param.src.js.shot deleted file mode 100644 index a56eab704615..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/as-param.src.js.shot +++ /dev/null @@ -1,291 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions as-param.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 4, - 12, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 13, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/basic-in-binary-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/basic-in-binary-expression.src.js.shot deleted file mode 100644 index 2b28216e2079..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/basic-in-binary-expression.src.js.shot +++ /dev/null @@ -1,697 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions basic-in-binary-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 7, - 9, - ], - "type": "ObjectExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 1, - 10, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "+", - "range": Array [ - 0, - 15, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "properties": Array [], - "range": Array [ - 25, - 27, - ], - "type": "ObjectExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 19, - 28, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "operator": "+", - "range": Array [ - 18, - 33, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 17, - 35, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 5, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/basic.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/basic.src.js.shot deleted file mode 100644 index 9fd9ec3be167..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/basic.src.js.shot +++ /dev/null @@ -1,178 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions basic.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 12, - ], - "raw": "\\"test\\"", - "type": "Literal", - "value": "test", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 12, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 5, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 12, - ], - "type": "String", - "value": "\\"test\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/block-body-not-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/block-body-not-object.src.js.shot deleted file mode 100644 index f2188951eca5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/block-body-not-object.src.js.shot +++ /dev/null @@ -1,329 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions block-body-not-object.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "body": Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "ExpressionStatement", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "label", - "optional": false, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 16, - ], - "type": "LabeledStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 18, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 18, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 4, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "value": "label", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/block-body.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/block-body.src.js.shot deleted file mode 100644 index 34082fc3d305..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/block-body.src.js.shot +++ /dev/null @@ -1,273 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions block-body.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 12, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 12, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 4, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-dup-params.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-dup-params.src.js.shot deleted file mode 100644 index fa7ac3476f0b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-dup-params.src.js.shot +++ /dev/null @@ -1,275 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-dup-params.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 12, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-default-param-eval.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-default-param-eval.src.js.shot deleted file mode 100644 index 442810635e01..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-default-param-eval.src.js.shot +++ /dev/null @@ -1,366 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-strict-default-param-eval.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "eval", - "optional": false, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 15, - 24, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 14, - 31, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 32, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "value": "eval", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-dup-params.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-dup-params.src.js.shot deleted file mode 100644 index c49d8c299baa..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-dup-params.src.js.shot +++ /dev/null @@ -1,348 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-strict-dup-params.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 14, - 26, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 27, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-eval-return.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-eval-return.src.js.shot deleted file mode 100644 index ec2906450b05..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-eval-return.src.js.shot +++ /dev/null @@ -1,273 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-strict-eval-return.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "eval", - "optional": false, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 14, - 26, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 26, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "value": "eval", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Numeric", - "value": "42", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-eval.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-eval.src.js.shot deleted file mode 100644 index f268b518cad7..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-eval.src.js.shot +++ /dev/null @@ -1,346 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-strict-eval.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 24, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 25, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 30, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "eval", - "optional": false, - "range": Array [ - 1, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 30, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 5, - ], - "type": "Identifier", - "value": "eval", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 24, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-octal.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-octal.src.js.shot deleted file mode 100644 index ece03a5396ad..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-octal.src.js.shot +++ /dev/null @@ -1,291 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-strict-octal.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "raw": "00", - "type": "Literal", - "value": 0, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 14, - 23, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 24, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "Numeric", - "value": "00", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-arguments.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-arguments.src.js.shot deleted file mode 100644 index 159a3d7feed8..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-arguments.src.js.shot +++ /dev/null @@ -1,348 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-strict-param-arguments.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 34, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "arguments", - "optional": false, - "range": Array [ - 15, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 14, - 34, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 35, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 24, - ], - "type": "Identifier", - "value": "arguments", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 34, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-eval.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-eval.src.js.shot deleted file mode 100644 index 07d22363882d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-eval.src.js.shot +++ /dev/null @@ -1,348 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-strict-param-eval.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "eval", - "optional": false, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 14, - 29, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 30, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "value": "eval", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-names.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-names.src.js.shot deleted file mode 100644 index b772330ff8c9..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-names.src.js.shot +++ /dev/null @@ -1,348 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-strict-param-names.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "eval", - "optional": false, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 14, - 29, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 30, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "value": "eval", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js.shot deleted file mode 100644 index 94626ddb831a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js.shot +++ /dev/null @@ -1,255 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-strict-param-no-paren-arguments.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "arguments", - "optional": false, - "range": Array [ - 14, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 14, - 29, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 30, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 23, - ], - "type": "Identifier", - "value": "arguments", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js.shot deleted file mode 100644 index 31062099d02e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js.shot +++ /dev/null @@ -1,255 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-strict-param-no-paren-eval.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "eval", - "optional": false, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 14, - 24, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "value": "eval", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-two-lines.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-two-lines.src.js.shot deleted file mode 100644 index e3aefbf0a541..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-two-lines.src.js.shot +++ /dev/null @@ -1,274 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions error-two-lines.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 8, - 16, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/expression.src.js.shot deleted file mode 100644 index 5c8f0d5dbf93..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/expression.src.js.shot +++ /dev/null @@ -1,220 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 1, - 7, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 5, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/iife.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/iife.src.js.shot deleted file mode 100644 index b519469a410e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/iife.src.js.shot +++ /dev/null @@ -1,352 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions iife.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "property", - "optional": false, - "range": Array [ - 8, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 8, - 20, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - }, - ], - "range": Array [ - 6, - 22, - ], - "type": "ObjectExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 23, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 4, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 16, - ], - "type": "Identifier", - "value": "property", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/multiple-params.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/multiple-params.src.js.shot deleted file mode 100644 index 6a4970cd86d7..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/multiple-params.src.js.shot +++ /dev/null @@ -1,275 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions multiple-params.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "raw": "\\"test\\"", - "type": "Literal", - "value": "test", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 16, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "type": "String", - "value": "\\"test\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/no-auto-return.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/no-auto-return.src.js.shot deleted file mode 100644 index ca557bc8091d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/no-auto-return.src.js.shot +++ /dev/null @@ -1,366 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions no-auto-return.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 17, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 17, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-arguments.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-arguments.src.js.shot deleted file mode 100644 index 6c2ed960a1ac..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-arguments.src.js.shot +++ /dev/null @@ -1,182 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions not-strict-arguments.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "arguments", - "optional": false, - "range": Array [ - 0, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 15, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Identifier", - "value": "arguments", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-eval-params.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-eval-params.src.js.shot deleted file mode 100644 index 5212878a716b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-eval-params.src.js.shot +++ /dev/null @@ -1,275 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions not-strict-eval-params.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "eval", - "optional": false, - "range": Array [ - 1, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 15, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 5, - ], - "type": "Identifier", - "value": "eval", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-eval.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-eval.src.js.shot deleted file mode 100644 index 1e3c66af3939..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-eval.src.js.shot +++ /dev/null @@ -1,182 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions not-strict-eval.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 10, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "eval", - "optional": false, - "range": Array [ - 0, - 4, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 10, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "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": "eval", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 7, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 10, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-octal.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-octal.src.js.shot deleted file mode 100644 index 3a7aef2a4ca9..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/not-strict-octal.src.js.shot +++ /dev/null @@ -1,218 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions not-strict-octal.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "raw": "0o0", - "type": "Literal", - "value": 0, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 10, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Numeric", - "value": "0o0", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/return-arrow-function.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/return-arrow-function.src.js.shot deleted file mode 100644 index 013339c5ed14..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/return-arrow-function.src.js.shot +++ /dev/null @@ -1,264 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions return-arrow-function.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 5, - 12, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 12, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 4, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/return-sequence.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/return-sequence.src.js.shot deleted file mode 100644 index 6a0e5199bed3..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/return-sequence.src.js.shot +++ /dev/null @@ -1,600 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions return-sequence.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "async": false, - "body": Object { - "expressions": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 26, - ], - "type": "SequenceExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 8, - 27, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 28, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 17, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param-parens.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param-parens.src.js.shot deleted file mode 100644 index 1ca178a95e6a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param-parens.src.js.shot +++ /dev/null @@ -1,218 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions single-param-parens.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "raw": "\\"test\\"", - "type": "Literal", - "value": "test", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 13, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "type": "String", - "value": "\\"test\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param-return-identifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param-return-identifier.src.js.shot deleted file mode 100644 index b91941a024af..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param-return-identifier.src.js.shot +++ /dev/null @@ -1,220 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions single-param-return-identifier.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "earth", - "optional": false, - "range": Array [ - 9, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "sun", - "optional": false, - "range": Array [ - 1, - 4, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 14, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "Identifier", - "value": "sun", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Identifier", - "value": "earth", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param.src.js.shot deleted file mode 100644 index 787c7e574f88..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/single-param.src.js.shot +++ /dev/null @@ -1,182 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript arrowFunctions single-param.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "raw": "\\"test\\"", - "type": "Literal", - "value": "test", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 11, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 4, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "type": "String", - "value": "\\"test\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/basics/and-operator-array-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/basics/and-operator-array-object.src.js.shot deleted file mode 100644 index 24c3a2164a68..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/basics/and-operator-array-object.src.js.shot +++ /dev/null @@ -1,1855 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript basics and-operator-array-object.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "v", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "left": Object { - "left": Object { - "left": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 8, - 10, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "operator": "&&", - "range": Array [ - 8, - 16, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 14, - 16, - ], - "type": "ObjectExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "operator": "&&", - "range": Array [ - 8, - 22, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "ArrayExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "operator": "&&", - "range": Array [ - 8, - 28, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "operator": "&&", - "range": Array [ - 8, - 42, - ], - "right": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 35, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "operator": "&&", - "range": Array [ - 33, - 41, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 39, - 41, - ], - "type": "ObjectExpression", - }, - "type": "LogicalExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 42, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 48, - 49, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "left": Object { - "left": Object { - "left": Object { - "left": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 52, - 54, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "operator": "&&", - "range": Array [ - 52, - 60, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 58, - 60, - ], - "type": "ArrayExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "operator": "&&", - "range": Array [ - 52, - 66, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "properties": Array [], - "range": Array [ - 64, - 66, - ], - "type": "ObjectExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "operator": "&&", - "range": Array [ - 52, - 72, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 70, - 72, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "operator": "&&", - "range": Array [ - 52, - 86, - ], - "right": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 77, - 79, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "operator": "&&", - "range": Array [ - 77, - 85, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 39, - "line": 2, - }, - }, - "range": Array [ - 83, - 85, - ], - "type": "ArrayExpression", - }, - "type": "LogicalExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 48, - 86, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 44, - 87, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 92, - 93, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "left": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 96, - 98, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "operator": "&&", - "range": Array [ - 96, - 104, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 102, - 104, - ], - "type": "ArrayExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 92, - 104, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 88, - 105, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 110, - 111, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "properties": Array [], - "range": Array [ - 114, - 116, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "operator": "&&", - "range": Array [ - 114, - 122, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "properties": Array [], - "range": Array [ - 120, - 122, - ], - "type": "ObjectExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 110, - 122, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 106, - 123, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 124, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "v", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "String", - "value": "\\"\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 35, - ], - "type": "String", - "value": "\\"\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 38, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 44, - 47, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 55, - 57, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 61, - 63, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 67, - 69, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 70, - 72, - ], - "type": "String", - "value": "\\"\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 73, - 75, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 77, - 79, - ], - "type": "String", - "value": "\\"\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 80, - 82, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 39, - "line": 2, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 88, - 91, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 99, - 101, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 104, - 105, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 106, - 109, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 115, - 116, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 117, - 119, - ], - "type": "Punctuator", - "value": "&&", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 120, - 121, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 121, - 122, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 122, - 123, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/basics/delete-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/basics/delete-expression.src.js.shot deleted file mode 100644 index ea33bcb2b130..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/basics/delete-expression.src.js.shot +++ /dev/null @@ -1,215 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript basics delete-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 7, - 14, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "delete", - "prefix": true, - "range": Array [ - 0, - 14, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "delete", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/basics/do-while-statements.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/basics/do-while-statements.src.js.shot deleted file mode 100644 index 9ca5eda169ab..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/basics/do-while-statements.src.js.shot +++ /dev/null @@ -1,797 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript basics do-while-statements.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "EmptyStatement", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "DoWhileStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 23, - 24, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 25, - ], - "type": "VariableDeclaration", - }, - Object { - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "operator": "+=", - "range": Array [ - 34, - 40, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 39, - 40, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 29, - 43, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 26, - 58, - ], - "test": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 51, - 52, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "operator": "<", - "range": Array [ - 51, - 56, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 55, - 56, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "type": "BinaryExpression", - }, - "type": "DoWhileStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 59, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 2, - ], - "type": "Keyword", - "value": "do", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 9, - ], - "type": "Keyword", - "value": "while", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "Keyword", - "value": "do", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 36, - 38, - ], - "type": "Punctuator", - "value": "+=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 44, - 49, - ], - "type": "Keyword", - "value": "while", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 15, - "line": 6, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/basics/identifiers-double-underscore.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/basics/identifiers-double-underscore.src.js.shot deleted file mode 100644 index cd84ca3b20b3..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/basics/identifiers-double-underscore.src.js.shot +++ /dev/null @@ -1,502 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript basics identifiers-double-underscore.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "__test", - "optional": false, - "range": Array [ - 4, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "raw": "'ff'", - "type": "Literal", - "value": "ff", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 17, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "type": "VariableDeclaration", - }, - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 32, - 36, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "__Foo", - "optional": false, - "range": Array [ - 26, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 20, - 36, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 55, - 59, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "name": "__Bar", - "optional": false, - "range": Array [ - 47, - 52, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "params": Array [], - "range": Array [ - 38, - 59, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 60, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 10, - ], - "type": "Identifier", - "value": "__test", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "type": "String", - "value": "'ff'", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 20, - 25, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 26, - 31, - ], - "type": "Identifier", - "value": "__Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 38, - 46, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "range": Array [ - 47, - 52, - ], - "type": "Identifier", - "value": "__Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 7, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/basics/instanceof.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/basics/instanceof.src.js.shot deleted file mode 100644 index 9f636d412f1a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/basics/instanceof.src.js.shot +++ /dev/null @@ -1,157 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript basics instanceof.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 2, - ], - "raw": "''", - "type": "Literal", - "value": "", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "instanceof", - "range": Array [ - 0, - 17, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "Set", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 2, - ], - "type": "String", - "value": "''", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 13, - ], - "type": "Keyword", - "value": "instanceof", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "Set", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/basics/new-with-member-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/basics/new-with-member-expression.src.js.shot deleted file mode 100644 index d540f39388ad..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/basics/new-with-member-expression.src.js.shot +++ /dev/null @@ -1,251 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript basics new-with-member-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 4, - 11, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "NewExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/basics/new-without-parens.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/basics/new-without-parens.src.js.shot deleted file mode 100644 index a136fbdfdc9f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/basics/new-without-parens.src.js.shot +++ /dev/null @@ -1,310 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript basics new-without-parens.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 16, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 17, - 22, - ], - "type": "NewExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 17, - 23, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/basics/or-operator-array-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/basics/or-operator-array-object.src.js.shot deleted file mode 100644 index d880e34edf5d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/basics/or-operator-array-object.src.js.shot +++ /dev/null @@ -1,1855 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript basics or-operator-array-object.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "v", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "left": Object { - "left": Object { - "left": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 8, - 10, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "operator": "||", - "range": Array [ - 8, - 16, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 14, - 16, - ], - "type": "ObjectExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "operator": "||", - "range": Array [ - 8, - 22, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "ArrayExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "operator": "||", - "range": Array [ - 8, - 28, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "operator": "||", - "range": Array [ - 8, - 42, - ], - "right": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 35, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "operator": "||", - "range": Array [ - 33, - 41, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 39, - 41, - ], - "type": "ObjectExpression", - }, - "type": "LogicalExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 42, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 48, - 49, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "left": Object { - "left": Object { - "left": Object { - "left": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 52, - 54, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "operator": "||", - "range": Array [ - 52, - 60, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 58, - 60, - ], - "type": "ArrayExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "operator": "||", - "range": Array [ - 52, - 66, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "properties": Array [], - "range": Array [ - 64, - 66, - ], - "type": "ObjectExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "operator": "||", - "range": Array [ - 52, - 72, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 70, - 72, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "operator": "||", - "range": Array [ - 52, - 86, - ], - "right": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 77, - 79, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "operator": "||", - "range": Array [ - 77, - 85, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 39, - "line": 2, - }, - }, - "range": Array [ - 83, - 85, - ], - "type": "ArrayExpression", - }, - "type": "LogicalExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 48, - 86, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 44, - 87, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 92, - 93, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "left": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 96, - 98, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "operator": "||", - "range": Array [ - 96, - 104, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 102, - 104, - ], - "type": "ArrayExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 92, - 104, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 88, - 105, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 110, - 111, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "properties": Array [], - "range": Array [ - 114, - 116, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "operator": "||", - "range": Array [ - 114, - 122, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "properties": Array [], - "range": Array [ - 120, - 122, - ], - "type": "ObjectExpression", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 110, - 122, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 106, - 123, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 124, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "v", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "String", - "value": "\\"\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 35, - ], - "type": "String", - "value": "\\"\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 38, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 44, - 47, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 55, - 57, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 61, - 63, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 67, - 69, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 70, - 72, - ], - "type": "String", - "value": "\\"\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 73, - 75, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 77, - 79, - ], - "type": "String", - "value": "\\"\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 80, - 82, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 39, - "line": 2, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 88, - 91, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 99, - 101, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 104, - 105, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 106, - 109, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 115, - 116, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 117, - 119, - ], - "type": "Punctuator", - "value": "||", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 120, - 121, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 121, - 122, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 122, - 123, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/basics/typeof-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/basics/typeof-expression.src.js.shot deleted file mode 100644 index 7478955678eb..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/basics/typeof-expression.src.js.shot +++ /dev/null @@ -1,119 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript basics typeof-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "raw": "'str'", - "type": "Literal", - "value": "str", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "typeof", - "prefix": true, - "range": Array [ - 0, - 12, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "String", - "value": "'str'", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/basics/update-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/basics/update-expression.src.js.shot deleted file mode 100644 index 38f46f64918b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/basics/update-expression.src.js.shot +++ /dev/null @@ -1,611 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript basics update-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 9, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "type": "VariableDeclaration", - }, - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "operator": "++", - "prefix": false, - "range": Array [ - 28, - 31, - ], - "type": "UpdateExpression", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 28, - 32, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 24, - 34, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 11, - 34, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "optional": false, - "range": Array [ - 35, - 38, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 35, - 39, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 11, - 19, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "Punctuator", - "value": "++", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/basics/void-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/basics/void-expression.src.js.shot deleted file mode 100644 index bd4a10bb0615..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/basics/void-expression.src.js.shot +++ /dev/null @@ -1,283 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript basics void-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "void", - "prefix": true, - "range": Array [ - 0, - 6, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 13, - 14, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "operator": "void", - "prefix": true, - "range": Array [ - 8, - 15, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 16, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 4, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 12, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/binary.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/binary.src.js.shot deleted file mode 100644 index 4a8d4f331bee..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/binary.src.js.shot +++ /dev/null @@ -1,101 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript bigIntLiterals binary.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "bigint": "1", - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 4, - ], - "raw": "0b1n", - "type": "Literal", - "value": 1n, - }, - "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", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/decimal.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/decimal.src.js.shot deleted file mode 100644 index bf56f2d96eb6..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/decimal.src.js.shot +++ /dev/null @@ -1,101 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript bigIntLiterals decimal.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "bigint": "1", - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 2, - ], - "raw": "1n", - "type": "Literal", - "value": 1n, - }, - "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", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/hex.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/hex.src.js.shot deleted file mode 100644 index 75125bb184eb..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/hex.src.js.shot +++ /dev/null @@ -1,101 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript bigIntLiterals hex.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "bigint": "1", - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 4, - ], - "raw": "0x1n", - "type": "Literal", - "value": 1n, - }, - "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", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/numeric-separator.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/numeric-separator.src.js.shot deleted file mode 100644 index 3cd9533db4a9..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/numeric-separator.src.js.shot +++ /dev/null @@ -1,101 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript bigIntLiterals numeric-separator.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "bigint": "123", - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "raw": "1_2_3n", - "type": "Literal", - "value": 123n, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Identifier", - "value": "1_2_3n", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/octal.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/octal.src.js.shot deleted file mode 100644 index 527868838972..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/bigIntLiterals/octal.src.js.shot +++ /dev/null @@ -1,101 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript bigIntLiterals octal.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "bigint": "1", - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 4, - ], - "raw": "0o1n", - "type": "Literal", - "value": 1n, - }, - "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", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/lowercase.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/lowercase.src.js.shot deleted file mode 100644 index 124bdb4cd05d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/lowercase.src.js.shot +++ /dev/null @@ -1,100 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript binaryLiterals lowercase.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "raw": "0b101", - "type": "Literal", - "value": 5, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Numeric", - "value": "0b101", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/uppercase.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/uppercase.src.js.shot deleted file mode 100644 index 3fa0b872adb5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/uppercase.src.js.shot +++ /dev/null @@ -1,100 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript binaryLiterals uppercase.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "raw": "0B101", - "type": "Literal", - "value": 5, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Numeric", - "value": "0B101", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/blockBindings/const.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/blockBindings/const.src.js.shot deleted file mode 100644 index 0e996dde2f18..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/blockBindings/const.src.js.shot +++ /dev/null @@ -1,198 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript blockBindings const.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 15, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/blockBindings/let-in-switchcase.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/blockBindings/let-in-switchcase.src.js.shot deleted file mode 100644 index 12070dc88d67..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/blockBindings/let-in-switchcase.src.js.shot +++ /dev/null @@ -1,490 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript blockBindings let-in-switchcase.src 1`] = ` -Object { - "body": Array [ - Object { - "cases": Array [ - Object { - "consequent": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "t", - "optional": false, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 37, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 38, - ], - "type": "VariableDeclaration", - }, - Object { - "label": null, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "BreakStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 45, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "type": "SwitchCase", - }, - ], - "discriminant": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "answer", - "optional": false, - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "type": "SwitchStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "switch", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - "value": "answer", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "Keyword", - "value": "case", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "value": "t", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 37, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 44, - ], - "type": "Keyword", - "value": "break", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/blockBindings/let.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/blockBindings/let.src.js.shot deleted file mode 100644 index bc446c5e3d1d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/blockBindings/let.src.js.shot +++ /dev/null @@ -1,198 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript blockBindings let.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 13, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/callExpression/call-expression-with-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/callExpression/call-expression-with-array.src.js.shot deleted file mode 100644 index 3dddfc56a210..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/callExpression/call-expression-with-array.src.js.shot +++ /dev/null @@ -1,213 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript callExpression call-expression-with-array.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "ArrayExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 7, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/callExpression/call-expression-with-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/callExpression/call-expression-with-object.src.js.shot deleted file mode 100644 index 9089a7c7a3a8..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/callExpression/call-expression-with-object.src.js.shot +++ /dev/null @@ -1,213 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript callExpression call-expression-with-object.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 4, - 6, - ], - "type": "ObjectExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 7, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/callExpression/mixed-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/callExpression/mixed-expression.src.js.shot deleted file mode 100644 index fb0236837939..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/callExpression/mixed-expression.src.js.shot +++ /dev/null @@ -1,973 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript callExpression mixed-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "properties": Array [], - "range": Array [ - 67, - 69, - ], - "type": "ObjectExpression", - }, - ], - "callee": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 59, - 61, - ], - "type": "ArrayExpression", - }, - ], - "callee": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "properties": Array [], - "range": Array [ - 46, - 48, - ], - "type": "ObjectExpression", - }, - Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 50, - 52, - ], - "type": "ArrayExpression", - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 40, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "call", - "optional": false, - "range": Array [ - 41, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 36, - 45, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 36, - 53, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 53, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 30, - 57, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 18, - 57, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 17, - 62, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 17, - 63, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 65, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 1, - 65, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 70, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 71, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 72, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 18, - 26, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 40, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 41, - 45, - ], - "type": "Identifier", - "value": "call", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/callExpression/new-expression-with-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/callExpression/new-expression-with-array.src.js.shot deleted file mode 100644 index 30fb7745a518..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/callExpression/new-expression-with-array.src.js.shot +++ /dev/null @@ -1,543 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript callExpression new-expression-with-array.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 10, - ], - "type": "ArrayExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "NewExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "elements": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "properties": Array [], - "range": Array [ - 23, - 25, - ], - "type": "ObjectExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 22, - 26, - ], - "type": "ArrayExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 21, - 27, - ], - "type": "ArrayExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 13, - 28, - ], - "type": "NewExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 13, - 29, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/callExpression/new-expression-with-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/callExpression/new-expression-with-object.src.js.shot deleted file mode 100644 index 3b615a44ca98..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/callExpression/new-expression-with-object.src.js.shot +++ /dev/null @@ -1,230 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript callExpression new-expression-with-object.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 8, - 10, - ], - "type": "ObjectExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "NewExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-accessor-properties.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-accessor-properties.src.js.shot deleted file mode 100644 index 7eab81027667..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-accessor-properties.src.js.shot +++ /dev/null @@ -1,650 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-accessor-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 18, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 14, - 18, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 19, - 29, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 24, - 29, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 31, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-computed-static-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-computed-static-method.src.js.shot deleted file mode 100644 index 115248166125..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-computed-static-method.src.js.shot +++ /dev/null @@ -1,449 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-computed-static-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 23, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 19, - 23, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 25, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-expression.src.js.shot deleted file mode 100644 index d30272154a97..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-expression.src.js.shot +++ /dev/null @@ -1,196 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": null, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 6, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-prototype.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-prototype.src.js.shot deleted file mode 100644 index 432b691a2599..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-prototype.src.js.shot +++ /dev/null @@ -1,377 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-method-named-prototype.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "prototype", - "optional": false, - "range": Array [ - 9, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 22, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 18, - 22, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 23, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 18, - ], - "type": "Identifier", - "value": "prototype", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-static.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-static.src.js.shot deleted file mode 100644 index 9eb3670aaa60..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-static.src.js.shot +++ /dev/null @@ -1,395 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-method-named-static.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "static", - "optional": false, - "range": Array [ - 9, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 19, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 15, - 19, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 21, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Identifier", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-with-space.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-with-space.src.js.shot deleted file mode 100644 index fa4567a5191f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-with-space.src.js.shot +++ /dev/null @@ -1,342 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-method-named-with-space.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "withSpace", - "optional": false, - "range": Array [ - 9, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 24, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 19, - 24, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 25, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 18, - ], - "type": "Identifier", - "value": "withSpace", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method-super.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method-super.src.js.shot deleted file mode 100644 index 434983b524cf..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method-super.src.js.shot +++ /dev/null @@ -1,505 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-one-method-super.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 41, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 27, - 32, - ], - "type": "Super", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 27, - 34, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 27, - 35, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 41, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 15, - 41, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 43, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 27, - 32, - ], - "type": "Keyword", - "value": "super", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method.src.js.shot deleted file mode 100644 index bcaecd135093..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method.src.js.shot +++ /dev/null @@ -1,377 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-one-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 19, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 15, - 19, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 21, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-accessor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-accessor.src.js.shot deleted file mode 100644 index 32d60d23aef0..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-accessor.src.js.shot +++ /dev/null @@ -1,1061 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-private-identifier-accessor.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "priv1", - "range": Array [ - 18, - 24, - ], - "type": "PrivateIdentifier", - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 39, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 29, - 37, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 39, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 24, - 39, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "priv1", - "range": Array [ - 46, - 52, - ], - "type": "PrivateIdentifier", - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 42, - 63, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 60, - 63, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": "value", - "optional": false, - "range": Array [ - 53, - 58, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 52, - 63, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 67, - 78, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 67, - 107, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 87, - 91, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "priv1", - "range": Array [ - 92, - 98, - ], - "type": "PrivateIdentifier", - }, - "range": Array [ - 87, - 98, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "operator": "=", - "range": Array [ - 87, - 102, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 101, - 102, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 87, - 103, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 81, - 107, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "params": Array [], - "range": Array [ - 78, - 107, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 109, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 109, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 110, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "Identifier", - "value": "#priv1", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "Identifier", - "value": "#priv1", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 53, - 58, - ], - "type": "Identifier", - "value": "value", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 67, - 78, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 87, - 91, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 91, - 92, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 92, - 98, - ], - "type": "Identifier", - "value": "#priv1", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 99, - 100, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 101, - 102, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-field.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-field.src.js.shot deleted file mode 100644 index 9d71835526e1..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-field.src.js.shot +++ /dev/null @@ -1,778 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-private-identifier-field.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "priv1", - "range": Array [ - 14, - 20, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 21, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "priv2", - "range": Array [ - 24, - 30, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 24, - 35, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 39, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 39, - 79, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 59, - 63, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "priv1", - "range": Array [ - 64, - 70, - ], - "type": "PrivateIdentifier", - }, - "range": Array [ - 59, - 70, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "operator": "=", - "range": Array [ - 59, - 74, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 73, - 74, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 59, - 75, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 53, - 79, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "params": Array [], - "range": Array [ - 50, - 79, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 81, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 81, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 82, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "value": "#priv1", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "Identifier", - "value": "#priv2", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 39, - 50, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 59, - 63, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 64, - 70, - ], - "type": "Identifier", - "value": "#priv1", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-method.src.js.shot deleted file mode 100644 index 3420e9af1dda..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-method.src.js.shot +++ /dev/null @@ -1,719 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-private-identifier-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 14, - 18, - ], - "type": "PrivateIdentifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 23, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 18, - 23, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 27, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 27, - 63, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 47, - 51, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "name": "bar", - "range": Array [ - 52, - 56, - ], - "type": "PrivateIdentifier", - }, - "range": Array [ - 47, - 56, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "optional": false, - "range": Array [ - 47, - 58, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 47, - 59, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 41, - 63, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "params": Array [], - "range": Array [ - 38, - 63, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 65, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 65, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 66, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "value": "#bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 27, - 38, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 47, - 51, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 52, - 56, - ], - "type": "Identifier", - "value": "#bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-prototype.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-prototype.src.js.shot deleted file mode 100644 index ba4b263d7576..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-prototype.src.js.shot +++ /dev/null @@ -1,429 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-static-method-named-prototype.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 28, - ], - "raw": "\\"prototype\\"", - "type": "Literal", - "value": "prototype", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 33, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 33, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 29, - 33, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 34, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 28, - ], - "type": "String", - "value": "\\"prototype\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-static.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-static.src.js.shot deleted file mode 100644 index 782fe911f008..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-static.src.js.shot +++ /dev/null @@ -1,413 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-static-method-named-static.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "static", - "optional": false, - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 26, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 22, - 26, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 28, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method.src.js.shot deleted file mode 100644 index 60f3ee16eaa6..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method.src.js.shot +++ /dev/null @@ -1,413 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-static-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 21, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 17, - 21, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 23, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-methods-and-accessor-properties.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-methods-and-accessor-properties.src.js.shot deleted file mode 100644 index fef551f8f4e1..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-methods-and-accessor-properties.src.js.shot +++ /dev/null @@ -1,865 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-static-methods-and-accessor-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 21, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 17, - 21, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 22, - 38, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 38, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 34, - 38, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 39, - 56, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 54, - "line": 1, - }, - }, - "range": Array [ - 54, - 56, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 52, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 51, - 56, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 58, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 58, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 1, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 59, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 59, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 49, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 52, - "line": 1, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 54, - "line": 1, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 55, - "line": 1, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 1, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-computed-static-methods.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-computed-static-methods.src.js.shot deleted file mode 100644 index 83bc9569d226..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-computed-static-methods.src.js.shot +++ /dev/null @@ -1,682 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-two-computed-static-methods.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 22, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 18, - 22, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 24, - 37, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 37, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 33, - 37, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 38, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-computed-constructor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-computed-constructor.src.js.shot deleted file mode 100644 index 544d2ce7fdf4..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-computed-constructor.src.js.shot +++ /dev/null @@ -1,590 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-two-methods-computed-constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 9, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 26, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 22, - 26, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 41, - ], - "raw": "\\"constructor\\"", - "type": "Literal", - "value": "constructor", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 27, - 46, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 46, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 42, - 46, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 47, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 22, - ], - "type": "String", - "value": "\\"constructor\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 41, - ], - "type": "String", - "value": "\\"constructor\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-semi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-semi.src.js.shot deleted file mode 100644 index fbb874c69f19..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-semi.src.js.shot +++ /dev/null @@ -1,574 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-two-methods-semi.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 14, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 10, - 14, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 15, - 20, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 16, - 20, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 21, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-three-semi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-three-semi.src.js.shot deleted file mode 100644 index 25e751448fa3..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-three-semi.src.js.shot +++ /dev/null @@ -1,610 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-two-methods-three-semi.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 10, - 15, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 11, - 15, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 16, - 21, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 17, - 21, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 23, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-two-semi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-two-semi.src.js.shot deleted file mode 100644 index 9aa250dce240..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-two-semi.src.js.shot +++ /dev/null @@ -1,592 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-two-methods-two-semi.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 14, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 10, - 14, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 15, - 20, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 16, - 20, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 22, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods.src.js.shot deleted file mode 100644 index 0e7540aea81d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods.src.js.shot +++ /dev/null @@ -1,556 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-two-methods.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 14, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 10, - 14, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 19, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 15, - 19, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 20, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-static-methods-named-constructor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-static-methods-named-constructor.src.js.shot deleted file mode 100644 index 31d2a1296b6b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-static-methods-named-constructor.src.js.shot +++ /dev/null @@ -1,592 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-two-static-methods-named-constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 16, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 31, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 27, - 31, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 39, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 32, - 54, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 52, - "line": 1, - }, - }, - "range": Array [ - 52, - 54, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 50, - 54, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 55, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 55, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 55, - "line": 1, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 56, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 27, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 50, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 52, - "line": 1, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 54, - "line": 1, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 55, - "line": 1, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-parameters.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-parameters.src.js.shot deleted file mode 100644 index 81d79860a13e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-parameters.src.js.shot +++ /dev/null @@ -1,439 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-with-constructor-parameters.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 9, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 32, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 32, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 20, - 32, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 33, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 20, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-with-space.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-with-space.src.js.shot deleted file mode 100644 index ae4dd655a616..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-with-space.src.js.shot +++ /dev/null @@ -1,377 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-with-constructor-with-space.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 9, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 25, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 21, - 25, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 26, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 20, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor.src.js.shot deleted file mode 100644 index 1db42bd6d313..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor.src.js.shot +++ /dev/null @@ -1,377 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes class-with-constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 9, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 9, - 24, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 20, - 24, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 25, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 20, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/derived-class-assign-to-var.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/derived-class-assign-to-var.src.js.shot deleted file mode 100644 index 3afca67d1282..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/derived-class-assign-to-var.src.js.shot +++ /dev/null @@ -1,348 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes derived-class-assign-to-var.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 27, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 27, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "superTypeParameters": undefined, - "type": "ClassExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 27, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 13, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/derived-class-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/derived-class-expression.src.js.shot deleted file mode 100644 index 6e214373bd0c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/derived-class-expression.src.js.shot +++ /dev/null @@ -1,250 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes derived-class-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": null, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 18, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "superTypeParameters": undefined, - "type": "ClassExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 6, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/empty-class-double-semi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/empty-class-double-semi.src.js.shot deleted file mode 100644 index bbe50c630e62..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/empty-class-double-semi.src.js.shot +++ /dev/null @@ -1,197 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes empty-class-double-semi.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 10, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/empty-class-semi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/empty-class-semi.src.js.shot deleted file mode 100644 index a91651fb18cc..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/empty-class-semi.src.js.shot +++ /dev/null @@ -1,215 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes empty-class-semi.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/empty-class.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/empty-class.src.js.shot deleted file mode 100644 index 07d6f1f4d686..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/empty-class.src.js.shot +++ /dev/null @@ -1,197 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes empty-class.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 10, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/empty-literal-derived-class.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/empty-literal-derived-class.src.js.shot deleted file mode 100644 index 35302c186829..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/empty-literal-derived-class.src.js.shot +++ /dev/null @@ -1,251 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes empty-literal-derived-class.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 15, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-declaration.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-declaration.src.js.shot deleted file mode 100644 index 45ab2064e117..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-declaration.src.js.shot +++ /dev/null @@ -1,159 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes invalid-class-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": null, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-setter-declaration.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-setter-declaration.src.js.shot deleted file mode 100644 index d4f9e8a6db68..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-setter-declaration.src.js.shot +++ /dev/null @@ -1,395 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes invalid-class-setter-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 10, - 22, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 17, - 22, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 23, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/named-class-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/named-class-expression.src.js.shot deleted file mode 100644 index 991a12914977..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/named-class-expression.src.js.shot +++ /dev/null @@ -1,234 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes named-class-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 11, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 6, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/named-derived-class-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/named-derived-class-expression.src.js.shot deleted file mode 100644 index 0f4a18c27e75..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/named-derived-class-expression.src.js.shot +++ /dev/null @@ -1,288 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript classes named-derived-class-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 20, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "superTypeParameters": undefined, - "type": "ClassExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 6, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 16, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-conditional.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-conditional.src.js.shot deleted file mode 100644 index 59249c850386..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-conditional.src.js.shot +++ /dev/null @@ -1,474 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript commaOperator comma-operator-conditional.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "xx", - "optional": false, - "range": Array [ - 4, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expressions": Array [ - Object { - "alternate": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "consequent": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "operator": "++", - "prefix": false, - "range": Array [ - 15, - 18, - ], - "type": "UpdateExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 22, - ], - "test": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "xx", - "optional": false, - "range": Array [ - 10, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ConditionalExpression", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 26, - ], - "type": "SequenceExpression", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 27, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "Identifier", - "value": "xx", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "Identifier", - "value": "xx", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Punctuator", - "value": "++", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-multi.src.js.shot deleted file mode 100644 index 3e50b7b5813f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-multi.src.js.shot +++ /dev/null @@ -1,581 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript commaOperator comma-operator-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "v1", - "optional": false, - "range": Array [ - 4, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expressions": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "raw": "6", - "type": "Literal", - "value": 6, - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "raw": "7", - "type": "Literal", - "value": 7, - }, - ], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 29, - ], - "type": "SequenceExpression", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 30, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "Identifier", - "value": "v1", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Numeric", - "value": "6", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Numeric", - "value": "7", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-nested.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-nested.src.js.shot deleted file mode 100644 index 8a71d3fafb8c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-nested.src.js.shot +++ /dev/null @@ -1,691 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript commaOperator comma-operator-nested.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "v1", - "optional": false, - "range": Array [ - 4, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expressions": Array [ - Object { - "expressions": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 18, - ], - "type": "SequenceExpression", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - Object { - "expressions": Array [ - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "raw": "6", - "type": "Literal", - "value": 6, - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "raw": "7", - "type": "Literal", - "value": 7, - }, - ], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 32, - ], - "type": "SequenceExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 33, - ], - "type": "SequenceExpression", - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 34, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "Identifier", - "value": "v1", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Numeric", - "value": "6", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Numeric", - "value": "7", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-return.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-return.src.js.shot deleted file mode 100644 index 6a4387cf6358..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-return.src.js.shot +++ /dev/null @@ -1,593 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript commaOperator comma-operator-return.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 22, - 27, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 28, - ], - "type": "VariableDeclaration", - }, - Object { - "argument": Object { - "expressions": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "name": "v1", - "optional": false, - "range": Array [ - 41, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 38, - 46, - ], - "type": "SequenceExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 31, - 47, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 49, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f1", - "optional": false, - "range": Array [ - 9, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 49, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Identifier", - "value": "f1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 41, - 43, - ], - "type": "Identifier", - "value": "v1", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-simple-nested.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-simple-nested.src.js.shot deleted file mode 100644 index e1bfdf3c2d1e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-simple-nested.src.js.shot +++ /dev/null @@ -1,378 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript commaOperator comma-operator-simple-nested.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expressions": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - ], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "SequenceExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 22, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-simple.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-simple.src.js.shot deleted file mode 100644 index d7f1c274092e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/commaOperator/comma-operator-simple.src.js.shot +++ /dev/null @@ -1,232 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript commaOperator comma-operator-simple.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 15, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-constructor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-constructor.src.js.shot deleted file mode 100644 index 3569cb9eb846..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-constructor.src.js.shot +++ /dev/null @@ -1,457 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript defaultParams class-constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 44, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 37, - 44, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 26, - 35, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 35, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 25, - 44, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 46, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 46, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 35, - ], - "type": "String", - "value": "'bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-method.src.js.shot deleted file mode 100644 index 57fcb198f6f9..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-method.src.js.shot +++ /dev/null @@ -1,457 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript defaultParams class-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 36, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 36, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 18, - 27, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 27, - ], - "raw": "'baz'", - "type": "Literal", - "value": "baz", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 17, - 36, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 38, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 27, - ], - "type": "String", - "value": "'baz'", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/declaration.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/defaultParams/declaration.src.js.shot deleted file mode 100644 index 8e72eeee0c54..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/declaration.src.js.shot +++ /dev/null @@ -1,313 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript defaultParams declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 16, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 20, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/defaultParams/expression.src.js.shot deleted file mode 100644 index a36ce0253ea5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/expression.src.js.shot +++ /dev/null @@ -1,368 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript defaultParams expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 22, - ], - "right": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 13, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 4, - 22, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 12, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/defaultParams/method.src.js.shot deleted file mode 100644 index ad60d4f5c4a7..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/method.src.js.shot +++ /dev/null @@ -1,502 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript defaultParams method.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 27, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 6, - 25, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 18, - 21, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 9, - 25, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 4, - 27, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 17, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/not-all-params.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/defaultParams/not-all-params.src.js.shot deleted file mode 100644 index a8eac5b333dd..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/not-all-params.src.js.shot +++ /dev/null @@ -1,521 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript defaultParams not-all-params.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 35, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 22, - 28, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 10, - 35, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 35, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 18, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js.shot deleted file mode 100644 index b5870a1cbee5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js.shot +++ /dev/null @@ -1,278 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-arrowFunctions arrow-param-array.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 1, - 4, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 10, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js.shot deleted file mode 100644 index 715917e932c6..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js.shot +++ /dev/null @@ -1,393 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-arrowFunctions arrow-param-nested-array.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 1, - 9, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 15, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js.shot deleted file mode 100644 index ad26763f0523..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js.shot +++ /dev/null @@ -1,630 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-arrowFunctions arrow-param-nested-object-named.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 2, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 8, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 10, - 20, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 13, - 19, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 12, - 20, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 21, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 27, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 5, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js.shot deleted file mode 100644 index d34a19fcefdf..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js.shot +++ /dev/null @@ -1,558 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-arrowFunctions arrow-param-nested-object.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 3, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 10, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 8, - 9, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 7, - 10, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 11, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 17, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js.shot deleted file mode 100644 index e3302567febc..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js.shot +++ /dev/null @@ -1,321 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-arrowFunctions arrow-param-object.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 3, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 4, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 10, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js.shot deleted file mode 100644 index 1aa480a1b1d3..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js.shot +++ /dev/null @@ -1,335 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-arrowFunctions param-defaults-array.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 2, - 8, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 1, - 9, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 15, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "x", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js.shot deleted file mode 100644 index 1c000de2ad38..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js.shot +++ /dev/null @@ -1,802 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-arrowFunctions param-defaults-object-nested.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "ArrayExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 8, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 2, - 8, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 10, - 23, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 15, - 21, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 15, - 21, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 13, - 23, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 24, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 35, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "]", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js.shot deleted file mode 100644 index f60c58a80fbe..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js.shot +++ /dev/null @@ -1,378 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-arrowFunctions param-defaults-object.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 8, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 2, - 8, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 9, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 15, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "x", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/array-const-undefined.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/array-const-undefined.src.js.shot deleted file mode 100644 index 15d77d2373a5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/array-const-undefined.src.js.shot +++ /dev/null @@ -1,271 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-blockBindings array-const-undefined.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/array-let-undefined.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/array-let-undefined.src.js.shot deleted file mode 100644 index fb391ec1034f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/array-let-undefined.src.js.shot +++ /dev/null @@ -1,271 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-blockBindings array-let-undefined.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 12, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-const-named.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-const-named.src.js.shot deleted file mode 100644 index 3ae7f3248810..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-const-named.src.js.shot +++ /dev/null @@ -1,350 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-blockBindings object-const-named.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 7, - 10, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 6, - 11, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 14, - 16, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-const-undefined.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-const-undefined.src.js.shot deleted file mode 100644 index 8a35c3242212..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-const-undefined.src.js.shot +++ /dev/null @@ -1,314 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-blockBindings object-const-undefined.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 7, - 8, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 6, - 9, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 12, - 14, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-let-named.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-let-named.src.js.shot deleted file mode 100644 index 7b1922e8ff4d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-let-named.src.js.shot +++ /dev/null @@ -1,350 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-blockBindings object-let-named.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 8, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 9, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 12, - 14, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-let-undefined.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-let-undefined.src.js.shot deleted file mode 100644 index 0be2c7d8a08e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-blockBindings/object-let-undefined.src.js.shot +++ /dev/null @@ -1,314 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-blockBindings object-let-undefined.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 6, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 7, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 10, - 12, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 12, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-array.src.js.shot deleted file mode 100644 index 1c22d9dab391..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-array.src.js.shot +++ /dev/null @@ -1,461 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-defaultParams param-array.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 14, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 20, - ], - "right": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "ArrayExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 24, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object-short.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object-short.src.js.shot deleted file mode 100644 index 99d9795d4171..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object-short.src.js.shot +++ /dev/null @@ -1,680 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-defaultParams param-object-short.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 2, - 21, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 6, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 7, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 17, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 11, - 16, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - }, - ], - "range": Array [ - 10, - 17, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 3, - 21, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 1, - 22, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js.shot deleted file mode 100644 index af7a23688088..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js.shot +++ /dev/null @@ -1,716 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-defaultParams param-object-wrapped.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 31, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 15, - 16, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 14, - 17, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 14, - 27, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 21, - 26, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - }, - ], - "range": Array [ - 20, - 27, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 5, - 31, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 1, - 32, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 13, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object.src.js.shot deleted file mode 100644 index d3b0511fe864..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-defaultParams/param-object.src.js.shot +++ /dev/null @@ -1,621 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-defaultParams param-object.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 30, - ], - "right": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 14, - 15, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 13, - 16, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 13, - 26, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 20, - 25, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - }, - ], - "range": Array [ - 19, - 26, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 4, - 30, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 12, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-forOf/loop.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-forOf/loop.src.js.shot deleted file mode 100644 index 9035479de392..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-forOf/loop.src.js.shot +++ /dev/null @@ -1,288 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-forOf loop.src 1`] = ` -Object { - "body": Array [ - Object { - "await": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "EmptyStatement", - }, - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForOfStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/complex-destructured.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/complex-destructured.src.js.shot deleted file mode 100644 index fe9333adb329..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/complex-destructured.src.js.shot +++ /dev/null @@ -1,532 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread complex-destructured.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 3, - 4, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 9, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 15, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 16, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 20, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "d", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/destructured-array-literal.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/destructured-array-literal.src.js.shot deleted file mode 100644 index f87059bfb1a0..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/destructured-array-literal.src.js.shot +++ /dev/null @@ -1,446 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread destructured-array-literal.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 7, - 13, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 13, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 14, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 18, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "d", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/destructuring-param.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/destructuring-param.src.js.shot deleted file mode 100644 index e7c4c0e8a6c5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/destructuring-param.src.js.shot +++ /dev/null @@ -1,542 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread destructuring-param.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "ok", - "optional": false, - "range": Array [ - 22, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 21, - 25, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 18, - 25, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 26, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 30, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "Identifier", - "value": "ok", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js.shot deleted file mode 100644 index f5983c69db40..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js.shot +++ /dev/null @@ -1,532 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread error-complex-destructured-spread-first.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 1, - 5, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 9, - 10, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 12, - 13, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 7, - 15, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 16, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 20, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "d", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js.shot deleted file mode 100644 index ac972ba65383..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js.shot +++ /dev/null @@ -1,292 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread invalid-not-final-array-empty.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 1, - 5, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 8, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 12, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/multi-destructured.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/multi-destructured.src.js.shot deleted file mode 100644 index 099813077c41..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/multi-destructured.src.js.shot +++ /dev/null @@ -1,331 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread multi-destructured.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 8, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 9, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 13, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/not-final-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/not-final-array.src.js.shot deleted file mode 100644 index 91a7755e6e97..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/not-final-array.src.js.shot +++ /dev/null @@ -1,331 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread not-final-array.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 1, - 5, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 9, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 13, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/single-destructured.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/single-destructured.src.js.shot deleted file mode 100644 index c84486fea607..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/single-destructured.src.js.shot +++ /dev/null @@ -1,274 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread single-destructured.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 1, - 5, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 6, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 10, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-complex-destructured.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-complex-destructured.src.js.shot deleted file mode 100644 index 8fdea157a809..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-complex-destructured.src.js.shot +++ /dev/null @@ -1,553 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread var-complex-destructured.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 7, - 8, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 10, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 5, - 13, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 15, - 19, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 20, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "d", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 24, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-destructured-array-literal.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-destructured-array-literal.src.js.shot deleted file mode 100644 index 82a555745aab..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-destructured-array-literal.src.js.shot +++ /dev/null @@ -1,467 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread var-destructured-array-literal.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 17, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 8, - 17, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 18, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "d", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 22, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-multi-destructured.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-multi-destructured.src.js.shot deleted file mode 100644 index 3784815c474c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-multi-destructured.src.js.shot +++ /dev/null @@ -1,352 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread var-multi-destructured.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 8, - 12, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 13, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 17, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-single-destructured.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-single-destructured.src.js.shot deleted file mode 100644 index cfe2fe744c8d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring-and-spread/var-single-destructured.src.js.shot +++ /dev/null @@ -1,295 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring-and-spread var-single-destructured.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 9, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 10, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/array-member.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/array-member.src.js.shot deleted file mode 100644 index 11880e217c01..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/array-member.src.js.shot +++ /dev/null @@ -1,309 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring array-member.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "ok", - "optional": false, - "range": Array [ - 1, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "v", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 1, - 5, - ], - "type": "MemberExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 6, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "20", - "type": "Literal", - "value": 20, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 3, - ], - "type": "Identifier", - "value": "ok", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "v", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "20", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/array-to-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/array-to-array.src.js.shot deleted file mode 100644 index 2b27d36e315b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/array-to-array.src.js.shot +++ /dev/null @@ -1,404 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring array-to-array.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 6, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 15, - ], - "right": Object { - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "ArrayExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/array-var-undefined.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/array-var-undefined.src.js.shot deleted file mode 100644 index e00d1424175c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/array-var-undefined.src.js.shot +++ /dev/null @@ -1,271 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring array-var-undefined.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 12, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/call-expression-destruction-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/call-expression-destruction-array.src.js.shot deleted file mode 100644 index e1b236b05d29..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/call-expression-destruction-array.src.js.shot +++ /dev/null @@ -1,248 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring call-expression-destruction-array.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "argument": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 9, - ], - "type": "SpreadElement", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 10, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/call-expression-destruction-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/call-expression-destruction-object.src.js.shot deleted file mode 100644 index 0ef44c61653f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/call-expression-destruction-object.src.js.shot +++ /dev/null @@ -1,248 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring call-expression-destruction-object.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 7, - 9, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 9, - ], - "type": "SpreadElement", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 10, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-array.src.js.shot deleted file mode 100644 index 3494762e7125..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-array.src.js.shot +++ /dev/null @@ -1,497 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring class-constructor-params-array.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "consturctor", - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 45, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 45, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 26, - 36, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 25, - 45, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 47, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "consturctor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-array.src.js.shot deleted file mode 100644 index 1e48387e5240..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-array.src.js.shot +++ /dev/null @@ -1,647 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring class-constructor-params-defaults-array.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "consturctor", - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 49, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 42, - 49, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 27, - 32, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 34, - 39, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 26, - 40, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 25, - 49, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 51, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "consturctor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-object.src.js.shot deleted file mode 100644 index 89d7bec8ca1e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-object.src.js.shot +++ /dev/null @@ -1,733 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring class-constructor-params-defaults-object.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "consturctor", - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 49, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 42, - 49, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 27, - 32, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 27, - 32, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 34, - 39, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 34, - 39, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 26, - 40, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 25, - 49, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 51, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "consturctor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-object.src.js.shot deleted file mode 100644 index 99ce9fb349b0..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-object.src.js.shot +++ /dev/null @@ -1,583 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring class-constructor-params-object.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "consturctor", - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 45, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 45, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 27, - 30, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 32, - 35, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 26, - 36, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 25, - 45, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 47, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "consturctor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-array.src.js.shot deleted file mode 100644 index a5727b567b53..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-array.src.js.shot +++ /dev/null @@ -1,497 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring class-method-params-array.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 37, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 37, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 18, - 28, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 17, - 37, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 39, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-array.src.js.shot deleted file mode 100644 index d0bed90500bb..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-array.src.js.shot +++ /dev/null @@ -1,647 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring class-method-params-defaults-array.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 41, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 19, - 24, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 26, - 31, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 18, - 32, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 17, - 41, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 43, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-object.src.js.shot deleted file mode 100644 index 381638adf40e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-object.src.js.shot +++ /dev/null @@ -1,733 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring class-method-params-defaults-object.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 41, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 19, - 24, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 19, - 24, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 26, - 31, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 26, - 31, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 18, - 32, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 17, - 41, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 43, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-object.src.js.shot deleted file mode 100644 index f48e895e4c45..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-object.src.js.shot +++ /dev/null @@ -1,583 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring class-method-params-object.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 37, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 37, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 19, - 22, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 24, - 27, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 18, - 28, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 17, - 37, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 39, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-all.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-all.src.js.shot deleted file mode 100644 index 2f0a156c13e2..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-all.src.js.shot +++ /dev/null @@ -1,595 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-array-all.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 13, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 20, - 25, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 26, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 30, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-longform-nested-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-longform-nested-multi.src.js.shot deleted file mode 100644 index a07485a07c60..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-longform-nested-multi.src.js.shot +++ /dev/null @@ -1,819 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-array-longform-nested-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 9, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 11, - 15, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 17, - 32, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 22, - 31, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 25, - 31, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 20, - 32, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 34, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 38, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-multi.src.js.shot deleted file mode 100644 index 324a1a136036..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-multi.src.js.shot +++ /dev/null @@ -1,445 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-array-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 18, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 22, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-nested-all.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-nested-all.src.js.shot deleted file mode 100644 index 755ecabd3e8f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-nested-all.src.js.shot +++ /dev/null @@ -1,521 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-array-nested-all.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 15, - 21, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 13, - 22, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 23, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 27, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-nested-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-nested-multi.src.js.shot deleted file mode 100644 index 0959f81fd93b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array-nested-multi.src.js.shot +++ /dev/null @@ -1,446 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-array-nested-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 13, - 18, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 19, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 23, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array.src.js.shot deleted file mode 100644 index eefedac7104c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-array.src.js.shot +++ /dev/null @@ -1,292 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-array.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 1, - 5, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 5, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 6, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 10, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 5, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-all.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-all.src.js.shot deleted file mode 100644 index d645ed370b26..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-all.src.js.shot +++ /dev/null @@ -1,724 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-object-all.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 13, - 18, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 13, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 20, - 25, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 20, - 25, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 26, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 30, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-assign.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-assign.src.js.shot deleted file mode 100644 index ea08a63ea0b9..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-assign.src.js.shot +++ /dev/null @@ -1,561 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-object-assign.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "Object", - "optional": false, - "range": Array [ - 3, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 3, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "Object", - "optional": false, - "range": Array [ - 3, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 3, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "String", - "optional": false, - "range": Array [ - 13, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 13, - 21, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "String", - "optional": false, - "range": Array [ - 13, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 13, - 21, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 23, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 1, - 28, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 26, - 28, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 9, - ], - "type": "Identifier", - "value": "Object", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 19, - ], - "type": "Identifier", - "value": "String", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform-all.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform-all.src.js.shot deleted file mode 100644 index 62fddc0d7d96..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform-all.src.js.shot +++ /dev/null @@ -1,832 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-object-longform-all.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 14, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 8, - 14, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 16, - 25, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 19, - 25, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 27, - 36, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 30, - 36, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 36, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 37, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 41, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 36, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform-multi.src.js.shot deleted file mode 100644 index ff2664d772a5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform-multi.src.js.shot +++ /dev/null @@ -1,682 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-object-longform-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 9, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 11, - 20, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 14, - 20, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 22, - 26, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 27, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 31, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform.src.js.shot deleted file mode 100644 index 09bad9cf65d8..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-longform.src.js.shot +++ /dev/null @@ -1,410 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-object-longform.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 6, - 15, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 9, - 15, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 17, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 21, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-mixed-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-mixed-multi.src.js.shot deleted file mode 100644 index 29554cdc9cc9..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-mixed-multi.src.js.shot +++ /dev/null @@ -1,610 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-object-mixed-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 6, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 8, - 17, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 17, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 17, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 19, - 20, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 21, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 17, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-multi.src.js.shot deleted file mode 100644 index d943686cc18d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-multi.src.js.shot +++ /dev/null @@ -1,574 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-object-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 13, - 14, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 16, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 18, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 22, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-nested-all.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-nested-all.src.js.shot deleted file mode 100644 index 9792670e0ad6..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-nested-all.src.js.shot +++ /dev/null @@ -1,686 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-object-nested-all.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 13, - 25, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 18, - 24, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 18, - 24, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 16, - 25, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 26, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 30, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-nested-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-nested-multi.src.js.shot deleted file mode 100644 index b6257ee5a440..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object-nested-multi.src.js.shot +++ /dev/null @@ -1,611 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-object-nested-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 13, - 21, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 18, - 19, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 16, - 21, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 22, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 26, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object.src.js.shot deleted file mode 100644 index 5d59d252a3ab..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/defaults-object.src.js.shot +++ /dev/null @@ -1,356 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring defaults-object.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 12, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "x", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/destructured-array-catch.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/destructured-array-catch.src.js.shot deleted file mode 100644 index f0d9beb6ffa5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/destructured-array-catch.src.js.shot +++ /dev/null @@ -1,960 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring destructured-array-catch.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "block": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 35, - 36, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 34, - 37, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 30, - 42, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 24, - 46, - ], - "type": "BlockStatement", - }, - "finalizer": null, - "handler": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 64, - 69, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "param": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "name": "stack", - "optional": false, - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "optional": false, - "range": Array [ - 55, - 62, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "range": Array [ - 49, - 69, - ], - "type": "CatchClause", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 69, - ], - "type": "TryStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 71, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 12, - 13, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 11, - 14, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 71, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 72, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Keyword", - "value": "try", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 49, - 54, - ], - "type": "Keyword", - "value": "catch", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - "value": "stack", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/destructured-object-catch.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/destructured-object-catch.src.js.shot deleted file mode 100644 index 99f124469b67..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/destructured-object-catch.src.js.shot +++ /dev/null @@ -1,1003 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring destructured-object-catch.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "block": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 35, - 36, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 34, - 37, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 30, - 42, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 24, - 46, - ], - "type": "BlockStatement", - }, - "finalizer": null, - "handler": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 64, - 69, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "param": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "name": "stack", - "optional": false, - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 56, - 61, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "name": "stack", - "optional": false, - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 55, - 62, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "range": Array [ - 49, - 69, - ], - "type": "CatchClause", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 69, - ], - "type": "TryStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 71, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 12, - 13, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 11, - 14, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 71, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 72, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Keyword", - "value": "try", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 49, - 54, - ], - "type": "Keyword", - "value": "catch", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - "value": "stack", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/invalid-defaults-object-assign.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/invalid-defaults-object-assign.src.js.shot deleted file mode 100644 index f23ecdeefb5c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/invalid-defaults-object-assign.src.js.shot +++ /dev/null @@ -1,558 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring invalid-defaults-object-assign.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "Object", - "optional": false, - "range": Array [ - 3, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 3, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "Object", - "optional": false, - "range": Array [ - 3, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 3, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "String", - "optional": false, - "range": Array [ - 13, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 13, - 21, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "String", - "optional": false, - "range": Array [ - 13, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 13, - 21, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 23, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 29, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 27, - 29, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 9, - ], - "type": "Identifier", - "value": "Object", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 19, - ], - "type": "Identifier", - "value": "String", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/named-param.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/named-param.src.js.shot deleted file mode 100644 index 873f710042d6..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/named-param.src.js.shot +++ /dev/null @@ -1,350 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring named-param.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "responseText", - "optional": false, - "range": Array [ - 3, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 3, - 21, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "text", - "optional": false, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 23, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 1, - 29, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "res", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 15, - ], - "type": "Identifier", - "value": "responseText", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "value": "text", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "res", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/nested-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/nested-array.src.js.shot deleted file mode 100644 index c970f3dbf8de..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/nested-array.src.js.shot +++ /dev/null @@ -1,682 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring nested-array.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - null, - Object { - "decorators": Array [], - "elements": Array [ - null, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 10, - 15, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 4, - 16, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - ], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 29, - ], - "type": "ArrayExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 30, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 30, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/nested-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/nested-object.src.js.shot deleted file mode 100644 index 2b2864dce2e5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/nested-object.src.js.shot +++ /dev/null @@ -1,1008 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring nested-object.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 9, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 11, - 22, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 16, - 20, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 14, - 22, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 24, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 29, - 35, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 35, - ], - "raw": "\\"3\\"", - "type": "Literal", - "value": "3", - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 37, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 42, - 48, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 48, - ], - "raw": "\\"b\\"", - "type": "Literal", - "value": "b", - }, - }, - ], - "range": Array [ - 40, - 50, - ], - "type": "ObjectExpression", - }, - }, - ], - "range": Array [ - 27, - 52, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 52, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 53, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 53, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "String", - "value": "\\"3\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "String", - "value": "\\"b\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 52, - "line": 1, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/object-var-named.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/object-var-named.src.js.shot deleted file mode 100644 index 1570468dbf0e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/object-var-named.src.js.shot +++ /dev/null @@ -1,350 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring object-var-named.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 8, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 9, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 12, - 14, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/object-var-undefined.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/object-var-undefined.src.js.shot deleted file mode 100644 index 4ca1b8678f1c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/object-var-undefined.src.js.shot +++ /dev/null @@ -1,314 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring object-var-undefined.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 5, - 6, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 4, - 7, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 10, - 12, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 12, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-array.src.js.shot deleted file mode 100644 index 79f9a2d3f756..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-array.src.js.shot +++ /dev/null @@ -1,371 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring param-defaults-array.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 12, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 19, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 23, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-object-nested.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-object-nested.src.js.shot deleted file mode 100644 index b624bab22860..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-object-nested.src.js.shot +++ /dev/null @@ -1,761 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring param-defaults-object-nested.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 38, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 12, - 18, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 12, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 20, - 33, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 25, - 31, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 25, - 31, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 23, - 33, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 11, - 34, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 38, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-object.src.js.shot deleted file mode 100644 index 27805974e8f5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/param-defaults-object.src.js.shot +++ /dev/null @@ -1,414 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring param-defaults-object.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 12, - 18, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 12, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 11, - 19, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 23, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-array-wrapped.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-array-wrapped.src.js.shot deleted file mode 100644 index 95477c0b1429..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-array-wrapped.src.js.shot +++ /dev/null @@ -1,425 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring params-array-wrapped.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 12, - 20, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 1, - 23, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-array.src.js.shot deleted file mode 100644 index b1464adf09d9..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-array.src.js.shot +++ /dev/null @@ -1,388 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring params-array.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 19, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 22, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-multi-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-multi-object.src.js.shot deleted file mode 100644 index e99c0eacc7b6..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-multi-object.src.js.shot +++ /dev/null @@ -1,431 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring params-multi-object.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 16, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 14, - 19, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 22, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-nested-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-nested-array.src.js.shot deleted file mode 100644 index 497ac3b53f45..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-nested-array.src.js.shot +++ /dev/null @@ -1,484 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring params-nested-array.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 27, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - null, - Object { - "decorators": Array [], - "elements": Array [ - null, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 17, - 22, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 23, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 27, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-nested-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-nested-object.src.js.shot deleted file mode 100644 index d2f8056302b7..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-nested-object.src.js.shot +++ /dev/null @@ -1,683 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring params-nested-object.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 35, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 12, - 16, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 18, - 29, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 23, - 27, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 21, - 29, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 11, - 31, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 35, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-object-wrapped.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-object-wrapped.src.js.shot deleted file mode 100644 index 18a48d95ed37..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-object-wrapped.src.js.shot +++ /dev/null @@ -1,511 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring params-object-wrapped.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 14, - 15, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 17, - 18, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 12, - 20, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 1, - 23, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-object.src.js.shot deleted file mode 100644 index 5095e7ab7afd..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/params-object.src.js.shot +++ /dev/null @@ -1,474 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring params-object.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 13, - 14, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 16, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 11, - 19, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 22, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/sparse-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/sparse-array.src.js.shot deleted file mode 100644 index 105e58db45b3..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/sparse-array.src.js.shot +++ /dev/null @@ -1,311 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript destructuring sparse-array.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - null, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 6, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 14, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "array", - "optional": false, - "range": Array [ - 9, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Identifier", - "value": "array", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/directives/block.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/directives/block.src.js.shot deleted file mode 100644 index 845f8bffb2a5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/directives/block.src.js.shot +++ /dev/null @@ -1,514 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript directives block.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 19, - 31, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 19, - 32, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 39, - 44, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 35, - 45, - ], - "type": "VariableDeclaration", - }, - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 48, - 60, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 48, - 61, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 63, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 63, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 64, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 19, - 31, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 35, - 38, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 48, - 60, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/directives/directive-in-class.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/directives/directive-in-class.src.js.shot deleted file mode 100644 index bf1268df26eb..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/directives/directive-in-class.src.js.shot +++ /dev/null @@ -1,1324 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript directives directive-in-class.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 31, - 42, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 31, - 75, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 56, - 68, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 56, - 69, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 46, - 75, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "params": Array [], - "range": Array [ - 43, - 75, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 85, - 88, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 81, - 121, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "range": Array [ - 102, - 114, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "range": Array [ - 102, - 115, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "range": Array [ - 92, - 121, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 12, - "line": 8, - }, - }, - "params": Array [], - "range": Array [ - 89, - 121, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 131, - 134, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 5, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 12, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 127, - 172, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "range": Array [ - 153, - 165, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "range": Array [ - 153, - 166, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 14, - }, - "start": Object { - "column": 20, - "line": 12, - }, - }, - "range": Array [ - 143, - 172, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 14, - }, - "start": Object { - "column": 12, - "line": 12, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 12, - }, - "start": Object { - "column": 13, - "line": 12, - }, - }, - "name": "value", - "optional": false, - "range": Array [ - 136, - 141, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 135, - 172, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 16, - }, - "start": Object { - "column": 4, - "line": 16, - }, - }, - "name": "method", - "optional": false, - "range": Array [ - 178, - 184, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 18, - }, - "start": Object { - "column": 4, - "line": 16, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 178, - 217, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 17, - }, - "start": Object { - "column": 8, - "line": 17, - }, - }, - "range": Array [ - 198, - 210, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 17, - }, - "start": Object { - "column": 8, - "line": 17, - }, - }, - "range": Array [ - 198, - 211, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 18, - }, - "start": Object { - "column": 14, - "line": 16, - }, - }, - "range": Array [ - 188, - 217, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 18, - }, - "start": Object { - "column": 11, - "line": 16, - }, - }, - "params": Array [], - "range": Array [ - 185, - 217, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 19, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 25, - 219, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 19, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 219, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 20, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 220, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 31, - 42, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 56, - 68, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 81, - 84, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 85, - 88, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 8, - }, - "start": Object { - "column": 12, - "line": 8, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 13, - "line": 8, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "range": Array [ - 102, - 114, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 9, - }, - "start": Object { - "column": 20, - "line": 9, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "range": Array [ - 120, - 121, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 12, - }, - "start": Object { - "column": 4, - "line": 12, - }, - }, - "range": Array [ - 127, - 130, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "range": Array [ - 131, - 134, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 12, - "line": 12, - }, - }, - "range": Array [ - 135, - 136, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 12, - }, - "start": Object { - "column": 13, - "line": 12, - }, - }, - "range": Array [ - 136, - 141, - ], - "type": "Identifier", - "value": "value", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 12, - }, - "start": Object { - "column": 18, - "line": 12, - }, - }, - "range": Array [ - 141, - 142, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 12, - }, - "start": Object { - "column": 20, - "line": 12, - }, - }, - "range": Array [ - 143, - 144, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "range": Array [ - 153, - 165, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 13, - }, - "start": Object { - "column": 20, - "line": 13, - }, - }, - "range": Array [ - 165, - 166, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 14, - }, - }, - "range": Array [ - 171, - 172, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 16, - }, - "start": Object { - "column": 4, - "line": 16, - }, - }, - "range": Array [ - 178, - 184, - ], - "type": "Identifier", - "value": "method", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 16, - }, - "start": Object { - "column": 11, - "line": 16, - }, - }, - "range": Array [ - 185, - 186, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 16, - }, - "start": Object { - "column": 12, - "line": 16, - }, - }, - "range": Array [ - 186, - 187, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 16, - }, - "start": Object { - "column": 14, - "line": 16, - }, - }, - "range": Array [ - 188, - 189, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 17, - }, - "start": Object { - "column": 8, - "line": 17, - }, - }, - "range": Array [ - 198, - 210, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 17, - }, - "start": Object { - "column": 20, - "line": 17, - }, - }, - "range": Array [ - 210, - 211, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 18, - }, - "start": Object { - "column": 4, - "line": 18, - }, - }, - "range": Array [ - 216, - 217, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 19, - }, - "start": Object { - "column": 0, - "line": 19, - }, - }, - "range": Array [ - 218, - 219, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/directives/first-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/directives/first-expression.src.js.shot deleted file mode 100644 index 578bf631b6b4..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/directives/first-expression.src.js.shot +++ /dev/null @@ -1,192 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript directives first-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 121, - 122, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 121, - 123, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 124, - 129, - ], - "raw": "\\"abc\\"", - "type": "Literal", - "value": "abc", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 124, - 129, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "type": "Line", - "value": " Prevent strings from being parsed as directives", - }, - Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 51, - 120, - ], - "type": "Line", - "value": " See https://github.com/prettier/prettier/pull/1560#issue-227225960", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 121, - 130, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 121, - 122, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 122, - 123, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 124, - 129, - ], - "type": "String", - "value": "\\"abc\\"", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/directives/function-non-strict.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/directives/function-non-strict.src.js.shot deleted file mode 100644 index f4f477bd5e5a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/directives/function-non-strict.src.js.shot +++ /dev/null @@ -1,400 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript directives function-non-strict.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": "use smth", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 30, - ], - "raw": "\\"use smth\\"", - "type": "Literal", - "value": "use smth", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 30, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "operator": "+", - "range": Array [ - 33, - 36, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 39, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 39, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 30, - ], - "type": "String", - "value": "\\"use smth\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/directives/non-directive-string.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/directives/non-directive-string.src.js.shot deleted file mode 100644 index 7d58ddf93982..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/directives/non-directive-string.src.js.shot +++ /dev/null @@ -1,978 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript directives non-directive-string.src 1`] = ` -Object { - "body": Array [ - Object { - "alternate": null, - "consequent": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 16, - 28, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 16, - 28, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 30, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 8, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - "type": "IfStatement", - }, - Object { - "cases": Array [ - Object { - "consequent": Array [ - Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 74, - 86, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 74, - 86, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 64, - 92, - ], - "type": "BlockStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 52, - 92, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 57, - 62, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - "type": "SwitchCase", - }, - Object { - "consequent": Array [ - Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "range": Array [ - 116, - 128, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "range": Array [ - 116, - 128, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 13, - "line": 9, - }, - }, - "range": Array [ - 106, - 134, - ], - "type": "BlockStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 97, - 134, - ], - "test": null, - "type": "SwitchCase", - }, - ], - "discriminant": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 40, - 44, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 32, - 136, - ], - "type": "SwitchStatement", - }, - Object { - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 15, - }, - "start": Object { - "column": 4, - "line": 15, - }, - }, - "range": Array [ - 157, - 169, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 15, - }, - "start": Object { - "column": 4, - "line": 15, - }, - }, - "range": Array [ - 157, - 169, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 16, - }, - "start": Object { - "column": 13, - "line": 14, - }, - }, - "range": Array [ - 151, - 171, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 16, - }, - "start": Object { - "column": 0, - "line": 14, - }, - }, - "range": Array [ - 138, - 171, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 14, - }, - "start": Object { - "column": 7, - "line": 14, - }, - }, - "range": Array [ - 145, - 149, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - "type": "WhileStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 17, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 172, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 2, - ], - "type": "Keyword", - "value": "if", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 8, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 16, - 28, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Keyword", - "value": "switch", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 40, - 44, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 52, - 56, - ], - "type": "Keyword", - "value": "case", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 57, - 62, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 74, - 86, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 91, - 92, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 97, - 104, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 104, - 105, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 9, - }, - "start": Object { - "column": 13, - "line": 9, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "range": Array [ - 116, - 128, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "range": Array [ - 133, - 134, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 12, - }, - }, - "range": Array [ - 135, - 136, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 14, - }, - "start": Object { - "column": 0, - "line": 14, - }, - }, - "range": Array [ - 138, - 143, - ], - "type": "Keyword", - "value": "while", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 14, - }, - "start": Object { - "column": 6, - "line": 14, - }, - }, - "range": Array [ - 144, - 145, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 14, - }, - "start": Object { - "column": 7, - "line": 14, - }, - }, - "range": Array [ - 145, - 149, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 14, - }, - "start": Object { - "column": 11, - "line": 14, - }, - }, - "range": Array [ - 149, - 150, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 14, - }, - "start": Object { - "column": 13, - "line": 14, - }, - }, - "range": Array [ - 151, - 152, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 15, - }, - "start": Object { - "column": 4, - "line": 15, - }, - }, - "range": Array [ - 157, - 169, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 16, - }, - "start": Object { - "column": 0, - "line": 16, - }, - }, - "range": Array [ - 170, - 171, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/directives/program-order.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/directives/program-order.src.js.shot deleted file mode 100644 index f4f8b529b143..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/directives/program-order.src.js.shot +++ /dev/null @@ -1,288 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript directives program-order.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": "use loose", - "expression": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "raw": "\\"use loose\\"", - "type": "Literal", - "value": "use loose", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 14, - 26, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "String", - "value": "\\"use loose\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/directives/program.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/directives/program.src.js.shot deleted file mode 100644 index 24d4eb22e3c5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/directives/program.src.js.shot +++ /dev/null @@ -1,342 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript directives program.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 23, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 14, - 24, - ], - "type": "VariableDeclaration", - }, - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 25, - 37, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 25, - 38, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 25, - 37, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalAsyncIteration/async-generators.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalAsyncIteration/async-generators.src.js.shot deleted file mode 100644 index 6b1ac11e7191..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalAsyncIteration/async-generators.src.js.shot +++ /dev/null @@ -1,234 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalAsyncIteration async-generators.src 1`] = ` -Object { - "body": Array [ - Object { - "async": true, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 26, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 26, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalAsyncIteration/async-iterator.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalAsyncIteration/async-iterator.src.js.shot deleted file mode 100644 index 6d84f246347c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalAsyncIteration/async-iterator.src.js.shot +++ /dev/null @@ -1,515 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalAsyncIteration async-iterator.src 1`] = ` -Object { - "body": Array [ - Object { - "async": true, - "body": Object { - "body": Array [ - Object { - "await": true, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 59, - 67, - ], - "type": "BlockStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "name": "item", - "optional": false, - "range": Array [ - 44, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 44, - 48, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 38, - 48, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 27, - 67, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "name": "items", - "optional": false, - "range": Array [ - 52, - 57, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForOfStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 69, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 69, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 70, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 31, - 36, - ], - "type": "Identifier", - "value": "await", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 38, - 43, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 44, - 48, - ], - "type": "Identifier", - "value": "item", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 49, - 51, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 52, - 57, - ], - "type": "Identifier", - "value": "items", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalDynamicImport/dynamic-import.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalDynamicImport/dynamic-import.src.js.shot deleted file mode 100644 index d1f1d8e70120..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalDynamicImport/dynamic-import.src.js.shot +++ /dev/null @@ -1,344 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalDynamicImport dynamic-import.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "main", - "optional": false, - "range": Array [ - 19, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "object": Object { - "attributes": null, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "raw": "'foo'", - "type": "Literal", - "value": "foo", - }, - "type": "ImportExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "then", - "optional": false, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 0, - 18, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 24, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "String", - "value": "'foo'", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "value": "then", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 23, - ], - "type": "Identifier", - "value": "main", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/arg-spread.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/arg-spread.src.js.shot deleted file mode 100644 index 819144e9ae49..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/arg-spread.src.js.shot +++ /dev/null @@ -1,435 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread arg-spread.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 12, - 13, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 15, - 19, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 11, - 20, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 24, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js.shot deleted file mode 100644 index 760d46c20a06..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js.shot +++ /dev/null @@ -1,582 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread destructuring-assign-mirror.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 3, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 9, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 1, - 10, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 1, - 22, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 14, - 15, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "SpreadElement", - }, - ], - "range": Array [ - 13, - 22, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js.shot deleted file mode 100644 index 88f212e38206..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js.shot +++ /dev/null @@ -1,335 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread function-parameter-object-spread.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 14, - 20, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 13, - 21, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 26, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js.shot deleted file mode 100644 index 8c9bdda99a53..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js.shot +++ /dev/null @@ -1,513 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread invalid-rest-trailing-comma.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 9, - 10, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 12, - 16, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 4, - 19, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/object-rest.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/object-rest.src.js.shot deleted file mode 100644 index 415f333aa84b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/object-rest.src.js.shot +++ /dev/null @@ -1,1029 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread object-rest.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 9, - 10, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 12, - 16, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 4, - 18, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 23, - 27, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 29, - 33, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 35, - 39, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 41, - 42, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 41, - 45, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - }, - ], - "range": Array [ - 21, - 47, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 47, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/property-spread.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/property-spread.src.js.shot deleted file mode 100644 index 776903479cd5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/property-spread.src.js.shot +++ /dev/null @@ -1,903 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread property-spread.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", - }, - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 42, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 56, - 59, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 56, - 64, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 61, - 64, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 77, - 80, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 73, - 80, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 70, - 80, - ], - "type": "SpreadElement", - }, - ], - "range": Array [ - 36, - 82, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 82, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 28, - 83, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 84, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 56, - 59, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "range": Array [ - 61, - 64, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 70, - 73, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "range": Array [ - 77, - 80, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 1, - "line": 9, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js.shot deleted file mode 100644 index ca5b4583ef5a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js.shot +++ /dev/null @@ -1,686 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread shorthand-method-args.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "initialize", - "optional": false, - "range": Array [ - 7, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 7, - 104, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 48, - "line": 2, - }, - }, - "range": Array [ - 51, - 104, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "someVar", - "optional": false, - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 19, - 26, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "someVar", - "optional": false, - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "otherVar", - "optional": false, - "range": Array [ - 28, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 28, - 36, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "otherVar", - "optional": false, - "range": Array [ - 28, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "name": "options", - "optional": false, - "range": Array [ - 41, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 38, - 48, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 18, - 49, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 17, - 104, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 1, - 106, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 108, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 61, - 98, - ], - "type": "Line", - "value": " ... do some stuff with options ...", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 109, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 7, - 17, - ], - "type": "Identifier", - "value": "initialize", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - "value": "someVar", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 28, - 36, - ], - "type": "Identifier", - "value": "otherVar", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 38, - 41, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 41, - 48, - ], - "type": "Identifier", - "value": "options", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 45, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 2, - }, - "start": Object { - "column": 46, - "line": 2, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 2, - }, - "start": Object { - "column": 48, - "line": 2, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-methods.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-methods.src.js.shot deleted file mode 100644 index 13fa0d20e05d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-methods.src.js.shot +++ /dev/null @@ -1,746 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread shorthand-methods.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "initialize", - "optional": false, - "range": Array [ - 14, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 14, - 111, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 48, - "line": 2, - }, - }, - "range": Array [ - 58, - 111, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "someVar", - "optional": false, - "range": Array [ - 26, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 26, - 33, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "someVar", - "optional": false, - "range": Array [ - 26, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "otherVar", - "optional": false, - "range": Array [ - 35, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 35, - 43, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "otherVar", - "optional": false, - "range": Array [ - 35, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "name": "options", - "optional": false, - "range": Array [ - 48, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 45, - 55, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 25, - 56, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 24, - 111, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 8, - 113, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 113, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 114, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 68, - 105, - ], - "type": "Line", - "value": " ... do some stuff with options ...", - }, - ], - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 114, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 24, - ], - "type": "Identifier", - "value": "initialize", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 33, - ], - "type": "Identifier", - "value": "someVar", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 35, - 43, - ], - "type": "Identifier", - "value": "otherVar", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 48, - 55, - ], - "type": "Identifier", - "value": "options", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 45, - "line": 2, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 2, - }, - "start": Object { - "column": 46, - "line": 2, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 2, - }, - "start": Object { - "column": 48, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 113, - 114, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-properties.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-properties.src.js.shot deleted file mode 100644 index 750f593f3f59..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/shorthand-properties.src.js.shot +++ /dev/null @@ -1,755 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread shorthand-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", - }, - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 42, - 45, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 51, - 54, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 63, - 66, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 60, - 66, - ], - "type": "SpreadElement", - }, - ], - "range": Array [ - 36, - 68, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 68, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 28, - 69, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 70, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 60, - 63, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "range": Array [ - 63, - 66, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 1, - "line": 9, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/single-spread.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/single-spread.src.js.shot deleted file mode 100644 index 8d4856335667..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/single-spread.src.js.shot +++ /dev/null @@ -1,827 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread single-spread.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", - }, - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 42, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 56, - 59, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 56, - 64, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 61, - 64, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 70, - 76, - ], - "type": "SpreadElement", - }, - ], - "range": Array [ - 36, - 78, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 78, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 28, - 79, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 80, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 56, - 59, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "range": Array [ - 61, - 64, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 70, - 73, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 1, - "line": 9, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js.shot deleted file mode 100644 index 1db333261991..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js.shot +++ /dev/null @@ -1,428 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread spread-trailing-comma.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 3, - 4, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "type": "SpreadElement", - }, - ], - "range": Array [ - 1, - 16, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/two-spread.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/two-spread.src.js.shot deleted file mode 100644 index e5a7e057f22f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/two-spread.src.js.shot +++ /dev/null @@ -1,783 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript experimentalObjectRestSpread two-spread.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", - }, - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 42, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 59, - 62, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 56, - 62, - ], - "type": "SpreadElement", - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 71, - 74, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 68, - 74, - ], - "type": "SpreadElement", - }, - ], - "range": Array [ - 36, - 76, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 76, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 28, - 77, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 78, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 56, - 59, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 59, - 62, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 68, - 71, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "range": Array [ - 71, - 74, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 1, - "line": 9, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/exponentiationOperators/exponential-operators.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/exponentiationOperators/exponential-operators.src.js.shot deleted file mode 100644 index 96a8280ac8c9..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/exponentiationOperators/exponential-operators.src.js.shot +++ /dev/null @@ -1,417 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript exponentiationOperators exponential-operators.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "operator": "**", - "range": Array [ - 8, - 14, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "operator": "**=", - "range": Array [ - 16, - 23, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 16, - 24, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "Punctuator", - "value": "**", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Punctuator", - "value": "**=", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/for/for-loop.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/for/for-loop.src.js.shot deleted file mode 100644 index 6176a65ea4a5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/for/for-loop.src.js.shot +++ /dev/null @@ -1,527 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript for for-loop.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "BlockStatement", - }, - "init": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 13, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 13, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "test": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "operator": "<", - "range": Array [ - 15, - 21, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "BinaryExpression", - }, - "type": "ForStatement", - "update": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "operator": "++", - "prefix": false, - "range": Array [ - 23, - 26, - ], - "type": "UpdateExpression", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Punctuator", - "value": "++", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/for/for-with-coma.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/for/for-with-coma.src.js.shot deleted file mode 100644 index 5e628265a04f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/for/for-with-coma.src.js.shot +++ /dev/null @@ -1,772 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript for for-with-coma.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 41, - 44, - ], - "type": "BlockStatement", - }, - "init": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "VariableDeclarator", - }, - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "j", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 22, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "test": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "operator": "<", - "range": Array [ - 24, - 29, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "j", - "optional": false, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "BinaryExpression", - }, - "type": "ForStatement", - "update": Object { - "expressions": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "operator": "++", - "prefix": false, - "range": Array [ - 31, - 34, - ], - "type": "UpdateExpression", - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "name": "j", - "optional": false, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "operator": "--", - "prefix": false, - "range": Array [ - 36, - 39, - ], - "type": "UpdateExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 39, - ], - "type": "SequenceExpression", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 46, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "j", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "j", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 34, - ], - "type": "Punctuator", - "value": "++", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "value": "j", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 39, - ], - "type": "Punctuator", - "value": "--", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/for/for-with-const.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/for/for-with-const.src.js.shot deleted file mode 100644 index a401f8c52403..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/for/for-with-const.src.js.shot +++ /dev/null @@ -1,454 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript for for-with-const.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "BlockStatement", - }, - "init": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 16, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "test": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "operator": "<", - "range": Array [ - 18, - 23, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "j", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "BinaryExpression", - }, - "type": "ForStatement", - "update": null, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "j", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/for/for-with-function.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/for/for-with-function.src.js.shot deleted file mode 100644 index 8048d407b66e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/for/for-with-function.src.js.shot +++ /dev/null @@ -1,639 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript for for-with-function.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "EmptyStatement", - }, - "init": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 5, - 10, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "test": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 12, - 33, - ], - "right": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "toExponential", - "optional": false, - "range": Array [ - 18, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 16, - 31, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 16, - 33, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "type": "AssignmentExpression", - }, - "type": "ForStatement", - "update": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 35, - 40, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "type": "AssignmentExpression", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 31, - ], - "type": "Identifier", - "value": "toExponential", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/for/for-with-let.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/for/for-with-let.src.js.shot deleted file mode 100644 index ab5c97cf978f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/for/for-with-let.src.js.shot +++ /dev/null @@ -1,454 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript for for-with-let.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "BlockStatement", - }, - "init": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 16, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "test": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "operator": "<", - "range": Array [ - 18, - 23, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "j", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "BinaryExpression", - }, - "type": "ForStatement", - "update": null, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "j", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-array.src.js.shot deleted file mode 100644 index 3a127f9866da..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-array.src.js.shot +++ /dev/null @@ -1,263 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forIn for-in-array.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "BlockStatement", - }, - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "ArrayExpression", - }, - "type": "ForInStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-bare-nonstrict.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-bare-nonstrict.src.js.shot deleted file mode 100644 index 10b3380c1444..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-bare-nonstrict.src.js.shot +++ /dev/null @@ -1,1663 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forIn for-in-bare-nonstrict.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "effects", - "optional": false, - "range": Array [ - 4, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 15, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "iterations", - "optional": false, - "range": Array [ - 21, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 35, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 17, - 36, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "stored", - "optional": false, - "range": Array [ - 41, - 47, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 41, - 47, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 37, - 48, - ], - "type": "VariableDeclaration", - }, - Object { - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "iterations", - "optional": false, - "range": Array [ - 119, - 129, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "operator": "++", - "prefix": true, - "range": Array [ - 117, - 129, - ], - "type": "UpdateExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 117, - 130, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 64, - "line": 4, - }, - }, - "range": Array [ - 113, - 132, - ], - "type": "BlockStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 58, - 59, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expressions": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "name": "effects", - "optional": false, - "range": Array [ - 65, - 72, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "operator": "++", - "prefix": true, - "range": Array [ - 63, - 72, - ], - "type": "UpdateExpression", - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 75, - 76, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "operator": "-", - "prefix": true, - "range": Array [ - 74, - 76, - ], - "type": "UnaryExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 63, - 76, - ], - "type": "SequenceExpression", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 58, - 77, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 54, - 77, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 49, - 132, - ], - "right": Object { - "expressions": Array [ - Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 32, - "line": 4, - }, - }, - "name": "stored", - "optional": false, - "range": Array [ - 81, - 87, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 32, - "line": 4, - }, - }, - "operator": "=", - "range": Array [ - 81, - 91, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 41, - "line": 4, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 90, - 91, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 4, - }, - "start": Object { - "column": 44, - "line": 4, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 46, - "line": 4, - }, - "start": Object { - "column": 45, - "line": 4, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 94, - 95, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 49, - "line": 4, - }, - "start": Object { - "column": 45, - "line": 4, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 94, - 98, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 4, - }, - "start": Object { - "column": 48, - "line": 4, - }, - }, - "range": Array [ - 97, - 98, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 52, - "line": 4, - }, - "start": Object { - "column": 51, - "line": 4, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 100, - 101, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 55, - "line": 4, - }, - "start": Object { - "column": 51, - "line": 4, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 100, - 104, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 4, - }, - "start": Object { - "column": 54, - "line": 4, - }, - }, - "range": Array [ - 103, - 104, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 58, - "line": 4, - }, - "start": Object { - "column": 57, - "line": 4, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 106, - 107, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 61, - "line": 4, - }, - "start": Object { - "column": 57, - "line": 4, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 106, - 110, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 4, - }, - "start": Object { - "column": 60, - "line": 4, - }, - }, - "range": Array [ - 109, - 110, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - }, - ], - "range": Array [ - 93, - 111, - ], - "type": "ObjectExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 62, - "line": 4, - }, - "start": Object { - "column": 32, - "line": 4, - }, - }, - "range": Array [ - 81, - 111, - ], - "type": "SequenceExpression", - }, - "type": "ForInStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 133, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 11, - ], - "type": "Identifier", - "value": "effects", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 31, - ], - "type": "Identifier", - "value": "iterations", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 37, - 40, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 41, - 47, - ], - "type": "Identifier", - "value": "stored", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 49, - 52, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 54, - 57, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 63, - 65, - ], - "type": "Punctuator", - "value": "++", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 65, - 72, - ], - "type": "Identifier", - "value": "effects", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": "-", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 29, - "line": 4, - }, - }, - "range": Array [ - 78, - 80, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 32, - "line": 4, - }, - }, - "range": Array [ - 81, - 87, - ], - "type": "Identifier", - "value": "stored", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 39, - "line": 4, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 41, - "line": 4, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 4, - }, - "start": Object { - "column": 42, - "line": 4, - }, - }, - "range": Array [ - 91, - 92, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 4, - }, - "start": Object { - "column": 44, - "line": 4, - }, - }, - "range": Array [ - 93, - 94, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 4, - }, - "start": Object { - "column": 45, - "line": 4, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 4, - }, - "start": Object { - "column": 46, - "line": 4, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 4, - }, - "start": Object { - "column": 48, - "line": 4, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 4, - }, - "start": Object { - "column": 49, - "line": 4, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 4, - }, - "start": Object { - "column": 51, - "line": 4, - }, - }, - "range": Array [ - 100, - 101, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 4, - }, - "start": Object { - "column": 52, - "line": 4, - }, - }, - "range": Array [ - 101, - 102, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 4, - }, - "start": Object { - "column": 54, - "line": 4, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 4, - }, - "start": Object { - "column": 55, - "line": 4, - }, - }, - "range": Array [ - 104, - 105, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 4, - }, - "start": Object { - "column": 57, - "line": 4, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 4, - }, - "start": Object { - "column": 58, - "line": 4, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 4, - }, - "start": Object { - "column": 60, - "line": 4, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 4, - }, - "start": Object { - "column": 61, - "line": 4, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 63, - "line": 4, - }, - "start": Object { - "column": 62, - "line": 4, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 4, - }, - "start": Object { - "column": 64, - "line": 4, - }, - }, - "range": Array [ - 113, - 114, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 117, - 119, - ], - "type": "Punctuator", - "value": "++", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 119, - 129, - ], - "type": "Identifier", - "value": "iterations", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 129, - 130, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 131, - 132, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-destruction-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-destruction-object.src.js.shot deleted file mode 100644 index ec228929e7f5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-destruction-object.src.js.shot +++ /dev/null @@ -1,507 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forIn for-in-destruction-object.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 33, - ], - "type": "BlockStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 10, - 14, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "value", - "optional": false, - "range": Array [ - 16, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 16, - 21, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "value", - "optional": false, - "range": Array [ - 16, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 9, - 22, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 22, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 22, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForInStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Identifier", - "value": "value", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-destruction.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-destruction.src.js.shot deleted file mode 100644 index 5ca5941cc03a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-destruction.src.js.shot +++ /dev/null @@ -1,421 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forIn for-in-destruction.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 33, - ], - "type": "BlockStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "value", - "optional": false, - "range": Array [ - 16, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 9, - 22, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 22, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 22, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForInStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Identifier", - "value": "value", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-object-with-body.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-object-with-body.src.js.shot deleted file mode 100644 index e274135285cd..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-object-with-body.src.js.shot +++ /dev/null @@ -1,263 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forIn for-in-object-with-body.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "BlockStatement", - }, - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 10, - 12, - ], - "type": "ObjectExpression", - }, - "type": "ForInStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-assigment.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-assigment.src.js.shot deleted file mode 100644 index 2c96724ca6fd..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-assigment.src.js.shot +++ /dev/null @@ -1,477 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forIn for-in-with-assigment.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "process", - "optional": false, - "range": Array [ - 25, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 25, - 35, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 36, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 15, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "list", - "optional": false, - "range": Array [ - 19, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForInStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 23, - ], - "type": "Identifier", - "value": "list", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 32, - ], - "type": "Identifier", - "value": "process", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-bare-assigment.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-bare-assigment.src.js.shot deleted file mode 100644 index 58e345316613..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-bare-assigment.src.js.shot +++ /dev/null @@ -1,304 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forIn for-in-with-bare-assigment.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "EmptyStatement", - }, - "left": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 5, - 10, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "arr", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForInStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "arr", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-const.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-const.src.js.shot deleted file mode 100644 index 9ee132c790e5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-const.src.js.shot +++ /dev/null @@ -1,423 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forIn for-in-with-const.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "process", - "optional": false, - "range": Array [ - 22, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 22, - 32, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 33, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 12, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "list", - "optional": false, - "range": Array [ - 16, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForInStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 20, - ], - "type": "Identifier", - "value": "list", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 29, - ], - "type": "Identifier", - "value": "process", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-milti-asigment.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-milti-asigment.src.js.shot deleted file mode 100644 index d9f493697272..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-milti-asigment.src.js.shot +++ /dev/null @@ -1,418 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forIn for-in-with-milti-asigment.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "EmptyStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 13, - 18, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 18, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 18, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "q", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForInStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "q", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-rest.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-rest.src.js.shot deleted file mode 100644 index 19bad50a51cc..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-rest.src.js.shot +++ /dev/null @@ -1,481 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forIn for-in-with-rest.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 41, - ], - "type": "BlockStatement", - }, - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 7, - 12, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "xx", - "optional": false, - "range": Array [ - 10, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "rrestOff", - "optional": false, - "range": Array [ - 17, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 5, - 27, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "array", - "optional": false, - "range": Array [ - 31, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForInStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "Identifier", - "value": "xx", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "Identifier", - "value": "rrestOff", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 36, - ], - "type": "Identifier", - "value": "array", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-var.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-var.src.js.shot deleted file mode 100644 index cd027ffe1b51..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-with-var.src.js.shot +++ /dev/null @@ -1,423 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forIn for-in-with-var.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "process", - "optional": false, - "range": Array [ - 20, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 20, - 30, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 31, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "list", - "optional": false, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForInStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "value": "list", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 27, - ], - "type": "Identifier", - "value": "process", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-array.src.js.shot deleted file mode 100644 index 74c75ca0a0d5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-array.src.js.shot +++ /dev/null @@ -1,399 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forOf for-of-array.src 1`] = ` -Object { - "body": Array [ - Object { - "await": false, - "body": Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "doSomething", - "optional": false, - "range": Array [ - 22, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 22, - 35, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 36, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "ArrayExpression", - }, - "type": "ForOfStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 33, - ], - "type": "Identifier", - "value": "doSomething", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-destruction-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-destruction-object.src.js.shot deleted file mode 100644 index 99ac29fb8ad2..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-destruction-object.src.js.shot +++ /dev/null @@ -1,508 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forOf for-of-destruction-object.src 1`] = ` -Object { - "body": Array [ - Object { - "await": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 33, - ], - "type": "BlockStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 10, - 14, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "value", - "optional": false, - "range": Array [ - 16, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 16, - 21, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "value", - "optional": false, - "range": Array [ - 16, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 9, - 22, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 22, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 22, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForOfStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Identifier", - "value": "value", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-destruction.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-destruction.src.js.shot deleted file mode 100644 index 2b4a1754bd5e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-destruction.src.js.shot +++ /dev/null @@ -1,422 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forOf for-of-destruction.src 1`] = ` -Object { - "body": Array [ - Object { - "await": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 33, - ], - "type": "BlockStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "value", - "optional": false, - "range": Array [ - 16, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 9, - 22, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 22, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 22, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForOfStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Identifier", - "value": "value", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-object.src.js.shot deleted file mode 100644 index a5f1c5aeb056..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-object.src.js.shot +++ /dev/null @@ -1,399 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forOf for-of-object.src 1`] = ` -Object { - "body": Array [ - Object { - "await": false, - "body": Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "doSomething", - "optional": false, - "range": Array [ - 22, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 22, - 35, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 36, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 14, - 16, - ], - "type": "ObjectExpression", - }, - "type": "ForOfStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 33, - ], - "type": "Identifier", - "value": "doSomething", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-function-initializer.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-function-initializer.src.js.shot deleted file mode 100644 index cbaf9bb3a107..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-function-initializer.src.js.shot +++ /dev/null @@ -1,737 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forOf for-of-with-function-initializer.src 1`] = ` -Object { - "body": Array [ - Object { - "await": false, - "body": Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 61, - 62, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 60, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "name": "process", - "optional": false, - "range": Array [ - 53, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 63, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 53, - 63, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "range": Array [ - 53, - 64, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 35, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "operator": "in", - "range": Array [ - 33, - 41, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 41, - ], - "type": "ArrayExpression", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 41, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 43, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 13, - 43, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 43, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 43, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 64, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "name": "list", - "optional": false, - "range": Array [ - 47, - 51, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForOfStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 65, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 21, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 35, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 38, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 46, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 51, - ], - "type": "Identifier", - "value": "list", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 60, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "range": Array [ - 53, - 60, - ], - "type": "Identifier", - "value": "process", - }, - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 1, - }, - "start": Object { - "column": 60, - "line": 1, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 63, - "line": 1, - }, - "start": Object { - "column": 62, - "line": 1, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-rest.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-rest.src.js.shot deleted file mode 100644 index 519f3a57053a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-rest.src.js.shot +++ /dev/null @@ -1,482 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forOf for-of-with-rest.src 1`] = ` -Object { - "body": Array [ - Object { - "await": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 41, - ], - "type": "BlockStatement", - }, - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 7, - 12, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "xx", - "optional": false, - "range": Array [ - 10, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "rrestOff", - "optional": false, - "range": Array [ - 17, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 5, - 27, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "array", - "optional": false, - "range": Array [ - 31, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForOfStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 12, - ], - "type": "Identifier", - "value": "xx", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "Identifier", - "value": "rrestOff", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 36, - ], - "type": "Identifier", - "value": "array", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-var-and-braces.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-var-and-braces.src.js.shot deleted file mode 100644 index 07b52f769da7..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-var-and-braces.src.js.shot +++ /dev/null @@ -1,439 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forOf for-of-with-var-and-braces.src 1`] = ` -Object { - "body": Array [ - Object { - "await": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "doSomething", - "optional": false, - "range": Array [ - 25, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 25, - 38, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 39, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 41, - ], - "type": "BlockStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForOfStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 36, - ], - "type": "Identifier", - "value": "doSomething", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-var-and-no-braces.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-var-and-no-braces.src.js.shot deleted file mode 100644 index 6f07f5aae409..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forOf/for-of-with-var-and-no-braces.src.js.shot +++ /dev/null @@ -1,384 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forOf for-of-with-var-and-no-braces.src 1`] = ` -Object { - "body": Array [ - Object { - "await": false, - "body": Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "doSomething", - "optional": false, - "range": Array [ - 23, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 23, - 36, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 37, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForOfStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 34, - ], - "type": "Identifier", - "value": "doSomething", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js.shot deleted file mode 100644 index a7da09419e43..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js.shot +++ /dev/null @@ -1,384 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forOf invalid-for-of-with-const-and-no-braces.src 1`] = ` -Object { - "body": Array [ - Object { - "await": false, - "body": Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "doSomething", - "optional": false, - "range": Array [ - 25, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 25, - 38, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 39, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 12, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForOfStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 36, - ], - "type": "Identifier", - "value": "doSomething", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js.shot deleted file mode 100644 index 82a3ee194708..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js.shot +++ /dev/null @@ -1,384 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript forOf invalid-for-of-with-let-and-no-braces.src 1`] = ` -Object { - "body": Array [ - Object { - "await": false, - "body": Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "doSomething", - "optional": false, - "range": Array [ - 23, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 23, - 36, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 37, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ForOfStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "for", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 13, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 34, - ], - "type": "Identifier", - "value": "doSomething", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/function/return-multiline-sequence.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/function/return-multiline-sequence.src.js.shot deleted file mode 100644 index b4d0437e1ecb..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/function/return-multiline-sequence.src.js.shot +++ /dev/null @@ -1,614 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript function return-multiline-sequence.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "expressions": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 54, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 40, - 55, - ], - "type": "SequenceExpression", - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 27, - 60, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 62, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 62, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 63, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/function/return-sequence.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/function/return-sequence.src.js.shot deleted file mode 100644 index c21961a38806..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/function/return-sequence.src.js.shot +++ /dev/null @@ -1,614 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript function return-sequence.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "expressions": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 41, - 42, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 35, - 42, - ], - "type": "SequenceExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 27, - 44, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 46, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 46, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/generators/anonymous-generator.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/generators/anonymous-generator.src.js.shot deleted file mode 100644 index d4e84ee7c6e1..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/generators/anonymous-generator.src.js.shot +++ /dev/null @@ -1,344 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript generators anonymous-generator.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "v", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "delegate": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 1, - 25, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "v", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-function.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-function.src.js.shot deleted file mode 100644 index b6be040201e0..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-function.src.js.shot +++ /dev/null @@ -1,234 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript generators async-generator-function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": true, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 23, - 27, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 1, - 27, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 1, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 1, - 6, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-method.src.js.shot deleted file mode 100644 index 3ed979807f5d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-method.src.js.shot +++ /dev/null @@ -1,660 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript generators async-generator-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 63, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": true, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "argument": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "name": "g", - "optional": false, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 53, - 56, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "delegate": true, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 46, - 56, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 42, - 56, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 36, - 57, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 63, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 23, - 63, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 65, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 65, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 66, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 36, - 41, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 46, - 51, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "value": "g", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/generators/double-yield.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/generators/double-yield.src.js.shot deleted file mode 100644 index 70f7e605cf68..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/generators/double-yield.src.js.shot +++ /dev/null @@ -1,378 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript generators double-yield.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "delegate": false, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 30, - ], - "type": "YieldExpression", - }, - "delegate": false, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 30, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 30, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 32, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": null, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 1, - 32, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 27, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/generators/empty-generator-declaration.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/generators/empty-generator-declaration.src.js.shot deleted file mode 100644 index 17e49d51c0ae..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/generators/empty-generator-declaration.src.js.shot +++ /dev/null @@ -1,251 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript generators empty-generator-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "t", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 16, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "t", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/generators/generator-declaration.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/generators/generator-declaration.src.js.shot deleted file mode 100644 index 736526fa8d44..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/generators/generator-declaration.src.js.shot +++ /dev/null @@ -1,363 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript generators generator-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": "v", - "optional": false, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "delegate": true, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 28, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 28, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 30, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 30, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 25, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "v", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/generators/yield-delegation.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/generators/yield-delegation.src.js.shot deleted file mode 100644 index 158c5c87e330..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/generators/yield-delegation.src.js.shot +++ /dev/null @@ -1,362 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript generators yield-delegation.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "v", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "delegate": true, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 24, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 24, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 26, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 1, - 26, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "v", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value-in-call.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value-in-call.src.js.shot deleted file mode 100644 index c06752088854..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value-in-call.src.js.shot +++ /dev/null @@ -1,420 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript generators yield-without-value-in-call.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "argument": null, - "delegate": false, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "YieldExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 16, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 16, - 25, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 26, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 28, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": null, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 1, - 28, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value-no-semi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value-no-semi.src.js.shot deleted file mode 100644 index ee157115e5ce..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value-no-semi.src.js.shot +++ /dev/null @@ -1,306 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript generators yield-without-value-no-semi.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": null, - "delegate": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 23, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 1, - 23, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value.src.js.shot deleted file mode 100644 index 4e7e917ea77b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/generators/yield-without-value.src.js.shot +++ /dev/null @@ -1,324 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript generators yield-without-value.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": null, - "delegate": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 24, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": null, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 1, - 24, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/globalReturn/return-identifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/globalReturn/return-identifier.src.js.shot deleted file mode 100644 index 9fd7c11f50b5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/globalReturn/return-identifier.src.js.shot +++ /dev/null @@ -1,119 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript globalReturn return-identifier.src 1`] = ` -Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "fooz", - "optional": false, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ReturnStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "fooz", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/hexLiterals/lowercase.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/hexLiterals/lowercase.src.js.shot deleted file mode 100644 index e91d302d0bcf..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/hexLiterals/lowercase.src.js.shot +++ /dev/null @@ -1,100 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript hexLiterals lowercase.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "raw": "0x2343", - "type": "Literal", - "value": 9027, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Numeric", - "value": "0x2343", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/hexLiterals/uppercase.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/hexLiterals/uppercase.src.js.shot deleted file mode 100644 index 360ccd1bfb46..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/hexLiterals/uppercase.src.js.shot +++ /dev/null @@ -1,100 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript hexLiterals uppercase.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "raw": "0X2343", - "type": "Literal", - "value": 9027, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Numeric", - "value": "0X2343", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/importMeta/simple-import-meta.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/importMeta/simple-import-meta.src.js.shot deleted file mode 100644 index 528b9d9652c9..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/importMeta/simple-import-meta.src.js.shot +++ /dev/null @@ -1,252 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript importMeta simple-import-meta.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "meta": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "import", - "optional": false, - "range": Array [ - 0, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "meta", - "optional": false, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 0, - 11, - ], - "type": "MetaProperty", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "url", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 0, - 15, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "meta", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "url", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/labels/label-break.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/labels/label-break.src.js.shot deleted file mode 100644 index e341b8a49f3a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/labels/label-break.src.js.shot +++ /dev/null @@ -1,410 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript labels label-break.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Object { - "body": Array [ - Object { - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "name": "loop1", - "optional": false, - "range": Array [ - 33, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 27, - 39, - ], - "type": "BreakStatement", - }, - Object { - "label": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "BreakStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 21, - 54, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 9, - 54, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 15, - 19, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - "type": "WhileStatement", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "loop1", - "optional": false, - "range": Array [ - 0, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 54, - ], - "type": "LabeledStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 55, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Identifier", - "value": "loop1", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Keyword", - "value": "while", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 27, - 32, - ], - "type": "Keyword", - "value": "break", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 33, - 38, - ], - "type": "Identifier", - "value": "loop1", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 44, - 49, - ], - "type": "Keyword", - "value": "break", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/labels/label-continue.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/labels/label-continue.src.js.shot deleted file mode 100644 index 94452ddccd2f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/labels/label-continue.src.js.shot +++ /dev/null @@ -1,410 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript labels label-continue.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Object { - "body": Array [ - Object { - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": "loop1", - "optional": false, - "range": Array [ - 36, - 41, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 27, - 42, - ], - "type": "ContinueStatement", - }, - Object { - "label": null, - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 47, - 56, - ], - "type": "ContinueStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 21, - 60, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 9, - 60, - ], - "test": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 15, - 19, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - "type": "WhileStatement", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "loop1", - "optional": false, - "range": Array [ - 0, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 60, - ], - "type": "LabeledStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 61, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Identifier", - "value": "loop1", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Keyword", - "value": "while", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 27, - 35, - ], - "type": "Keyword", - "value": "continue", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 36, - 41, - ], - "type": "Identifier", - "value": "loop1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 47, - 55, - ], - "type": "Keyword", - "value": "continue", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/error-delete.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/error-delete.src.js.shot deleted file mode 100644 index 05f6591d9f2b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/error-delete.src.js.shot +++ /dev/null @@ -1,307 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules error-delete.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "raw": "\\"x\\"", - "type": "Literal", - "value": "x", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 7, - 8, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "operator": "delete", - "prefix": true, - "range": Array [ - 19, - 27, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 19, - 28, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "String", - "value": "\\"x\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Keyword", - "value": "delete", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/error-function.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/error-function.src.js.shot deleted file mode 100644 index b679d5c3db17..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/error-function.src.js.shot +++ /dev/null @@ -1,310 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules error-function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "friends", - "optional": false, - "range": Array [ - 31, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 16, - 39, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 41, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 41, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 23, - 30, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "Identifier", - "value": "friends", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/error-strict.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/error-strict.src.js.shot deleted file mode 100644 index 7d16a340d5ad..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/error-strict.src.js.shot +++ /dev/null @@ -1,607 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules error-strict.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 25, - ], - "raw": "\\"house\\"", - "type": "Literal", - "value": "house", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "house", - "optional": false, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 7, - 12, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - Object { - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "name": "roof", - "optional": false, - "range": Array [ - 56, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "name": "console", - "optional": false, - "range": Array [ - 44, - 51, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "log", - "optional": false, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 44, - 55, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "optional": false, - "range": Array [ - 44, - 61, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 44, - 62, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 41, - 64, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "house", - "optional": false, - "range": Array [ - 34, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 28, - 64, - ], - "type": "WithStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 65, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "value": "house", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 25, - ], - "type": "String", - "value": "\\"house\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 28, - 32, - ], - "type": "Keyword", - "value": "with", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 34, - 39, - ], - "type": "Identifier", - "value": "house", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 44, - 51, - ], - "type": "Identifier", - "value": "console", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "value": "log", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 56, - 60, - ], - "type": "Identifier", - "value": "roof", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-async-named-function.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-async-named-function.src.js.shot deleted file mode 100644 index a8e1ef5fe2fb..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-async-named-function.src.js.shot +++ /dev/null @@ -1,255 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-async-named-function.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "async": true, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 7, - 30, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 21, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-const.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-const.src.js.shot deleted file mode 100644 index 0a95bfa68ebc..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-const.src.js.shot +++ /dev/null @@ -1,235 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-const.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 20, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 21, - ], - "type": "VariableDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-async-named-function.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-async-named-function.src.js.shot deleted file mode 100644 index db890c144b83..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-async-named-function.src.js.shot +++ /dev/null @@ -1,270 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-default-async-named-function.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "async": true, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 38, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 30, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 15, - 38, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 29, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-class.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-class.src.js.shot deleted file mode 100644 index b5981d8975fa..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-class.src.js.shot +++ /dev/null @@ -1,178 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-default-class.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": null, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 25, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-function.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-function.src.js.shot deleted file mode 100644 index 45714a2fc63a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-function.src.js.shot +++ /dev/null @@ -1,214 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-default-function.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 15, - 29, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 23, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-named-class.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-named-class.src.js.shot deleted file mode 100644 index 023f6a95744c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-named-class.src.js.shot +++ /dev/null @@ -1,216 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-default-named-class.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Test", - "optional": false, - "range": Array [ - 21, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 30, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "Identifier", - "value": "Test", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-named-function.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-named-function.src.js.shot deleted file mode 100644 index 2c546347ec2e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-named-function.src.js.shot +++ /dev/null @@ -1,252 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-default-named-function.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 32, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 15, - 32, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 23, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-object.src.js.shot deleted file mode 100644 index 096ea12c5323..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-object.src.js.shot +++ /dev/null @@ -1,270 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-default-object.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 17, - 23, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - }, - ], - "range": Array [ - 15, - 25, - ], - "type": "ObjectExpression", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-value.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-value.src.js.shot deleted file mode 100644 index b740c7a1e513..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-default-value.src.js.shot +++ /dev/null @@ -1,138 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-default-value.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-default.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-default.src.js.shot deleted file mode 100644 index 50e668ba1b98..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-default.src.js.shot +++ /dev/null @@ -1,254 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-from-default.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 27, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "default", - "optional": false, - "range": Array [ - 8, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "default", - "optional": false, - "range": Array [ - 8, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 15, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 15, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 27, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-default.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-default.src.js.shot deleted file mode 100644 index cb86e42ad9e8..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-default.src.js.shot +++ /dev/null @@ -1,290 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-from-named-as-default.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "default", - "optional": false, - "range": Array [ - 15, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 22, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 22, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 28, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-specifier.src.js.shot deleted file mode 100644 index b6ea0ea5fd11..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-specifier.src.js.shot +++ /dev/null @@ -1,290 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-from-named-as-specifier.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 30, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 18, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 30, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-specifiers.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-specifiers.src.js.shot deleted file mode 100644 index 000d3159b7c2..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-named-as-specifiers.src.js.shot +++ /dev/null @@ -1,386 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-from-named-as-specifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 39, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "default", - "optional": false, - "range": Array [ - 15, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 22, - ], - "type": "ExportSpecifier", - }, - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 24, - 27, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 22, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 33, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 39, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-specifier.src.js.shot deleted file mode 100644 index 916b81714ee1..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-specifier.src.js.shot +++ /dev/null @@ -1,254 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-from-specifier.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 23, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 23, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-specifiers.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-specifiers.src.js.shot deleted file mode 100644 index 3bf874bb4b0a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-from-specifiers.src.js.shot +++ /dev/null @@ -1,350 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-from-specifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", - }, - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 13, - 16, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-function.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-function.src.js.shot deleted file mode 100644 index 1dc5377d4988..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-function.src.js.shot +++ /dev/null @@ -1,237 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-function.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 7, - 25, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-let.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-let.src.js.shot deleted file mode 100644 index a4710809ff38..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-let.src.js.shot +++ /dev/null @@ -1,235 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-let.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 18, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 19, - ], - "type": "VariableDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-default.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-default.src.js.shot deleted file mode 100644 index 475f0cc95b7f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-default.src.js.shot +++ /dev/null @@ -1,236 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-named-as-default.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "source": null, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "default", - "optional": false, - "range": Array [ - 15, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 22, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 22, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-specifier.src.js.shot deleted file mode 100644 index 0c1dc2f78452..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-specifier.src.js.shot +++ /dev/null @@ -1,236 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-named-as-specifier.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "source": null, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 18, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-specifiers.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-specifiers.src.js.shot deleted file mode 100644 index 0eafa54619cd..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-as-specifiers.src.js.shot +++ /dev/null @@ -1,332 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-named-as-specifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "source": null, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "default", - "optional": false, - "range": Array [ - 15, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 22, - ], - "type": "ExportSpecifier", - }, - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 24, - 27, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 22, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-class.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-class.src.js.shot deleted file mode 100644 index ac9079f7fb6d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-class.src.js.shot +++ /dev/null @@ -1,201 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-named-class.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Test", - "optional": false, - "range": Array [ - 13, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 22, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "type": "Identifier", - "value": "Test", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifier.src.js.shot deleted file mode 100644 index c8e5a2f80469..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifier.src.js.shot +++ /dev/null @@ -1,200 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-named-specifier.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "source": null, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifiers-comma.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifiers-comma.src.js.shot deleted file mode 100644 index eaef4de89e8b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifiers-comma.src.js.shot +++ /dev/null @@ -1,314 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-named-specifiers-comma.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "source": null, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", - }, - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 13, - 16, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifiers.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifiers.src.js.shot deleted file mode 100644 index d46f4a043c9c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-named-specifiers.src.js.shot +++ /dev/null @@ -1,296 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-named-specifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "source": null, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", - }, - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 13, - 16, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-var-anonymous-function.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-var-anonymous-function.src.js.shot deleted file mode 100644 index 5567c75a6328..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-var-anonymous-function.src.js.shot +++ /dev/null @@ -1,331 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-var-anonymous-function.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 17, - 31, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 31, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 32, - ], - "type": "VariableDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-var-number.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-var-number.src.js.shot deleted file mode 100644 index d9df301c4972..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-var-number.src.js.shot +++ /dev/null @@ -1,235 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-var-number.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 18, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 19, - ], - "type": "VariableDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/export-var.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/export-var.src.js.shot deleted file mode 100644 index aea42111a458..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/export-var.src.js.shot +++ /dev/null @@ -1,181 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules export-var.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "VariableDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-default-and-named-specifiers.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-default-and-named-specifiers.src.js.shot deleted file mode 100644 index 6cb4421767fe..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-default-and-named-specifiers.src.js.shot +++ /dev/null @@ -1,327 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-default-and-named-specifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 7, - 10, - ], - "type": "ImportDefaultSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 13, - 16, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-default-and-namespace-specifiers.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-default-and-namespace-specifiers.src.js.shot deleted file mode 100644 index 0772f12cae1b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-default-and-namespace-specifiers.src.js.shot +++ /dev/null @@ -1,305 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-default-and-namespace-specifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 31, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 7, - 10, - ], - "type": "ImportDefaultSpecifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 12, - 20, - ], - "type": "ImportNamespaceSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 31, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-default-as.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-default-as.src.js.shot deleted file mode 100644 index 9ddd682c0eff..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-default-as.src.js.shot +++ /dev/null @@ -1,289 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-default-as.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "default", - "optional": false, - "range": Array [ - 8, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 22, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 15, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 28, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-default.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-default.src.js.shot deleted file mode 100644 index 730de4c64334..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-default.src.js.shot +++ /dev/null @@ -1,195 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-default.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 7, - 10, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 15, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-jquery.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-jquery.src.js.shot deleted file mode 100644 index 108e2b959ce8..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-jquery.src.js.shot +++ /dev/null @@ -1,177 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-jquery.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 22, - ], - "raw": "\\"jquery\\"", - "type": "Literal", - "value": "jquery", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "$", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 7, - 8, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "$", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 22, - ], - "type": "String", - "value": "\\"jquery\\"", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-as-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-as-specifier.src.js.shot deleted file mode 100644 index 8ddcdd19ccc1..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-as-specifier.src.js.shot +++ /dev/null @@ -1,289 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-named-as-specifier.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 30, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 18, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 30, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-as-specifiers.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-as-specifiers.src.js.shot deleted file mode 100644 index ce8ce411d486..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-as-specifiers.src.js.shot +++ /dev/null @@ -1,385 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-named-as-specifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 35, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 18, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "xyz", - "optional": false, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "xyz", - "optional": false, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 20, - 23, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "value": "xyz", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 29, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 35, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifier.src.js.shot deleted file mode 100644 index a0964248ed94..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifier.src.js.shot +++ /dev/null @@ -1,253 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-named-specifier.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 23, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 11, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 23, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifiers-comma.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifiers-comma.src.js.shot deleted file mode 100644 index 9d3eea955593..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifiers-comma.src.js.shot +++ /dev/null @@ -1,367 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-named-specifiers-comma.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 29, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 11, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 13, - 16, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 23, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 29, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifiers.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifiers.src.js.shot deleted file mode 100644 index a9fc1aaa2acf..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-named-specifiers.src.js.shot +++ /dev/null @@ -1,349 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-named-specifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 11, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 13, - 16, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-namespace-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-namespace-specifier.src.js.shot deleted file mode 100644 index 3885bff06539..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-namespace-specifier.src.js.shot +++ /dev/null @@ -1,231 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-namespace-specifier.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 26, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 7, - 15, - ], - "type": "ImportNamespaceSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 20, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 26, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/import-null-as-nil.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/import-null-as-nil.src.js.shot deleted file mode 100644 index 6b390b59d106..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/import-null-as-nil.src.js.shot +++ /dev/null @@ -1,271 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules import-null-as-nil.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 33, - ], - "raw": "\\"bar\\"", - "type": "Literal", - "value": "bar", - }, - "specifiers": Array [ - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "null", - "optional": false, - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "nil", - "optional": false, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 9, - 20, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "type": "Null", - "value": "null", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "nil", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 27, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 33, - ], - "type": "String", - "value": "\\"bar\\"", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-await.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-await.src.js.shot deleted file mode 100644 index 96d37663dc82..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-await.src.js.shot +++ /dev/null @@ -1,181 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules invalid-await.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "await", - "optional": false, - "range": Array [ - 11, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 17, - ], - "type": "VariableDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "type": "Identifier", - "value": "await", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-class.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-class.src.js.shot deleted file mode 100644 index 2f7c04440398..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-class.src.js.shot +++ /dev/null @@ -1,178 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules invalid-class.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": null, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 23, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-default.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-default.src.js.shot deleted file mode 100644 index 973ec845d90d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-default.src.js.shot +++ /dev/null @@ -1,182 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript modules invalid-export-named-default.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "source": null, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "default", - "optional": false, - "range": Array [ - 8, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "default", - "optional": false, - "range": Array [ - 8, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 15, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 15, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/newTarget/invalid-new-target.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/newTarget/invalid-new-target.src.js.shot deleted file mode 100644 index 4967cdc601c5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/newTarget/invalid-new-target.src.js.shot +++ /dev/null @@ -1,272 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript newTarget invalid-new-target.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "meta": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "new", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "target", - "optional": false, - "range": Array [ - 12, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 8, - 18, - ], - "type": "MetaProperty", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 18, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "type": "Identifier", - "value": "target", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/newTarget/invalid-unknown-property.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/newTarget/invalid-unknown-property.src.js.shot deleted file mode 100644 index ebe6c8183eeb..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/newTarget/invalid-unknown-property.src.js.shot +++ /dev/null @@ -1,424 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript newTarget invalid-unknown-property.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "meta": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "new", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "unknown_property", - "optional": false, - "range": Array [ - 25, - 41, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 21, - 41, - ], - "type": "MetaProperty", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 42, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 44, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 8, - 44, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 44, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 16, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 41, - ], - "type": "Identifier", - "value": "unknown_property", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/newTarget/simple-new-target.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/newTarget/simple-new-target.src.js.shot deleted file mode 100644 index fa677626c027..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/newTarget/simple-new-target.src.js.shot +++ /dev/null @@ -1,444 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript newTarget simple-new-target.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "meta": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "new", - "optional": false, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "target", - "optional": false, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 27, - 37, - ], - "type": "MetaProperty", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 23, - 37, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 38, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 40, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 40, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "target", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteral/object-literal-in-lhs.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteral/object-literal-in-lhs.src.js.shot deleted file mode 100644 index 61801e02fb7c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteral/object-literal-in-lhs.src.js.shot +++ /dev/null @@ -1,364 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteral object-literal-in-lhs.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "object": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 3, - 5, - ], - "type": "ObjectExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 0, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 6, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 0, - 8, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 14, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "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": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-addition-property.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-addition-property.src.js.shot deleted file mode 100644 index c47f0ad24b4a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-addition-property.src.js.shot +++ /dev/null @@ -1,439 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralComputedProperties computed-addition-property.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "operator": "+", - "range": Array [ - 15, - 20, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "type": "BinaryExpression", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 14, - 26, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 23, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 8, - 28, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 28, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js.shot deleted file mode 100644 index 54c3293f26fc..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js.shot +++ /dev/null @@ -1,440 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralComputedProperties computed-and-identifier.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 9, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 11, - 16, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "raw": "20", - "type": "Literal", - "value": 20, - }, - }, - ], - "range": Array [ - 1, - 17, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "Numeric", - "value": "20", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js.shot deleted file mode 100644 index 0d6c9eeb70cb..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js.shot +++ /dev/null @@ -1,672 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralComputedProperties computed-getter-and-setter.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 14, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 9, - 14, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "computed": true, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 16, - 29, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "v", - "optional": false, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 23, - 29, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 1, - 30, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 5, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "value": "v", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-string-property.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-string-property.src.js.shot deleted file mode 100644 index 9a5d4eb3996d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-string-property.src.js.shot +++ /dev/null @@ -1,366 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralComputedProperties computed-string-property.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 20, - ], - "raw": "\\"hey\\"", - "type": "Literal", - "value": "hey", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 14, - 26, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 23, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 8, - 28, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 28, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "String", - "value": "\\"hey\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-variable-property.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-variable-property.src.js.shot deleted file mode 100644 index 7c627afaf31a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/computed-variable-property.src.js.shot +++ /dev/null @@ -1,368 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralComputedProperties computed-variable-property.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 14, - 24, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 8, - 26, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 26, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js.shot deleted file mode 100644 index 53c49f1bc19a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js.shot +++ /dev/null @@ -1,377 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralComputedProperties standalone-expression-with-addition.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 6, - ], - "raw": "\\"x\\"", - "type": "Literal", - "value": "x", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "operator": "+", - "range": Array [ - 3, - 12, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "raw": "\\"y\\"", - "type": "Literal", - "value": "y", - }, - "type": "BinaryExpression", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 17, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 17, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - }, - ], - "range": Array [ - 1, - 18, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 6, - ], - "type": "String", - "value": "\\"x\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "String", - "value": "\\"y\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 17, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js.shot deleted file mode 100644 index 6581e09d0164..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js.shot +++ /dev/null @@ -1,402 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralComputedProperties standalone-expression-with-method.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 20, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 7, - 20, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 1, - 21, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression.src.js.shot deleted file mode 100644 index ee112a09ec2d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/standalone-expression.src.js.shot +++ /dev/null @@ -1,306 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralComputedProperties standalone-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 9, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - }, - ], - "range": Array [ - 1, - 10, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js.shot deleted file mode 100644 index de9baf959f3d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js.shot +++ /dev/null @@ -1,727 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralDuplicateProperties error-proto-property.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "proto", - "optional": false, - "range": Array [ - 19, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "properties": Array [], - "range": Array [ - 27, - 29, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 29, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 30, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "name": "__proto__", - "optional": false, - "range": Array [ - 43, - 52, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 43, - 59, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "name": "proto", - "optional": false, - "range": Array [ - 54, - 59, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "name": "__proto__", - "optional": false, - "range": Array [ - 62, - 71, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 62, - 78, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "name": "proto", - "optional": false, - "range": Array [ - 73, - 78, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 40, - 80, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 36, - 80, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 32, - 81, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 81, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "Identifier", - "value": "proto", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "range": Array [ - 43, - 52, - ], - "type": "Identifier", - "value": "__proto__", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 54, - 59, - ], - "type": "Identifier", - "value": "proto", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "range": Array [ - 62, - 71, - ], - "type": "Identifier", - "value": "__proto__", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 73, - 78, - ], - "type": "Identifier", - "value": "proto", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 8, - }, - "start": Object { - "column": 1, - "line": 8, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js.shot deleted file mode 100644 index d9c3b6ab645a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js.shot +++ /dev/null @@ -1,723 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralDuplicateProperties error-proto-string-property.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "proto", - "optional": false, - "range": Array [ - 19, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "properties": Array [], - "range": Array [ - 27, - 29, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 29, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 30, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "range": Array [ - 43, - 54, - ], - "raw": "\\"__proto__\\"", - "type": "Literal", - "value": "__proto__", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 43, - 61, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "name": "proto", - "optional": false, - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "range": Array [ - 64, - 75, - ], - "raw": "\\"__proto__\\"", - "type": "Literal", - "value": "__proto__", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 64, - 82, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "name": "proto", - "optional": false, - "range": Array [ - 77, - 82, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 40, - 84, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 36, - 84, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 32, - 85, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 85, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "Identifier", - "value": "proto", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "range": Array [ - 43, - 54, - ], - "type": "String", - "value": "\\"__proto__\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - "value": "proto", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "range": Array [ - 64, - 75, - ], - "type": "String", - "value": "\\"__proto__\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "range": Array [ - 77, - 82, - ], - "type": "Identifier", - "value": "proto", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 8, - }, - "start": Object { - "column": 1, - "line": 8, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js.shot deleted file mode 100644 index 920a5e9de721..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js.shot +++ /dev/null @@ -1,537 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralDuplicateProperties strict-duplicate-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 26, - 36, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 29, - 36, - ], - "raw": "'first'", - "type": "Literal", - "value": "first", - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 39, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 42, - 50, - ], - "raw": "'second'", - "type": "Literal", - "value": "second", - }, - }, - ], - "range": Array [ - 23, - 52, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 52, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 53, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 53, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 29, - 36, - ], - "type": "String", - "value": "'first'", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 42, - 50, - ], - "type": "String", - "value": "'second'", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js.shot deleted file mode 100644 index 317b960150fe..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js.shot +++ /dev/null @@ -1,533 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralDuplicateProperties strict-duplicate-string-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 26, - 29, - ], - "raw": "\\"y\\"", - "type": "Literal", - "value": "y", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 26, - 38, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 31, - 38, - ], - "raw": "\\"first\\"", - "type": "Literal", - "value": "first", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 41, - 44, - ], - "raw": "\\"y\\"", - "type": "Literal", - "value": "y", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 41, - 54, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 46, - 54, - ], - "raw": "\\"second\\"", - "type": "Literal", - "value": "second", - }, - }, - ], - "range": Array [ - 23, - 56, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 56, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 57, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 57, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "String", - "value": "\\"y\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "String", - "value": "\\"first\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 41, - 44, - ], - "type": "String", - "value": "\\"y\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 46, - 54, - ], - "type": "String", - "value": "\\"second\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/method-property.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/method-property.src.js.shot deleted file mode 100644 index ac8abefcf163..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/method-property.src.js.shot +++ /dev/null @@ -1,483 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralShorthandMethods method-property.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 14, - 47, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 37, - 40, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 30, - 41, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 20, - 47, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 17, - 47, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 8, - 49, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 49, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 37, - 40, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js.shot deleted file mode 100644 index b51e058983a8..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js.shot +++ /dev/null @@ -1,404 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralShorthandMethods simple-method-named-get.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 25, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 10, - 23, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 13, - 23, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 4, - 25, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "ExpressionStatement", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js.shot deleted file mode 100644 index acd890e7ed1b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js.shot +++ /dev/null @@ -1,404 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralShorthandMethods simple-method-named-set.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 25, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 10, - 23, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 13, - 23, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 4, - 25, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "ExpressionStatement", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js.shot deleted file mode 100644 index 91e5ad3aeced..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js.shot +++ /dev/null @@ -1,444 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralShorthandMethods simple-method-with-argument.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 33, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "method", - "optional": false, - "range": Array [ - 10, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 10, - 31, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 23, - 31, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 16, - 31, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 4, - 33, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "type": "ExpressionStatement", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 16, - ], - "type": "Identifier", - "value": "method", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js.shot deleted file mode 100644 index 8f207cc58c7b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js.shot +++ /dev/null @@ -1,402 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralShorthandMethods simple-method-with-string-name.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 30, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 18, - ], - "raw": "\\"method\\"", - "type": "Literal", - "value": "method", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 10, - 28, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 21, - 28, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 18, - 28, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 4, - 30, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "ExpressionStatement", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 18, - ], - "type": "String", - "value": "\\"method\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method.src.js.shot deleted file mode 100644 index c56f1df59d0b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/simple-method.src.js.shot +++ /dev/null @@ -1,404 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralShorthandMethods simple-method.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 28, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "method", - "optional": false, - "range": Array [ - 10, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 10, - 26, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 19, - 26, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 16, - 26, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 4, - 28, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "ExpressionStatement", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 16, - ], - "type": "Identifier", - "value": "method", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js.shot deleted file mode 100644 index 04671139283b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js.shot +++ /dev/null @@ -1,481 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralShorthandMethods string-name-method-property.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 14, - 49, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 32, - 43, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 49, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 19, - 49, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 8, - 51, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 51, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 53, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js.shot deleted file mode 100644 index 7c826870297e..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js.shot +++ /dev/null @@ -1,763 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript objectLiteralShorthandProperties shorthand-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", - }, - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 42, - 45, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 51, - 54, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 60, - 63, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 60, - 63, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 60, - 63, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 36, - 65, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 65, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 28, - 66, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 67, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 60, - 63, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 1, - "line": 9, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/legacy.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/legacy.src.js.shot deleted file mode 100644 index d9a01d35b844..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/legacy.src.js.shot +++ /dev/null @@ -1,100 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript octalLiterals legacy.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "raw": "02343", - "type": "Literal", - "value": 2343, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Numeric", - "value": "02343", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/lowercase.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/lowercase.src.js.shot deleted file mode 100644 index 13e2d73d019f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/lowercase.src.js.shot +++ /dev/null @@ -1,100 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript octalLiterals lowercase.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "raw": "0o717", - "type": "Literal", - "value": 463, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Numeric", - "value": "0o717", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/strict-uppercase.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/strict-uppercase.src.js.shot deleted file mode 100644 index 100aec417a95..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/strict-uppercase.src.js.shot +++ /dev/null @@ -1,173 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript octalLiterals strict-uppercase.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "raw": "0O717", - "type": "Literal", - "value": 463, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "type": "Numeric", - "value": "0O717", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/uppercase.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/uppercase.src.js.shot deleted file mode 100644 index add712ad5cab..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/uppercase.src.js.shot +++ /dev/null @@ -1,100 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript octalLiterals uppercase.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "raw": "0O717", - "type": "Literal", - "value": 463, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Numeric", - "value": "0O717", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/regex/regexp-simple.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/regex/regexp-simple.src.js.shot deleted file mode 100644 index 3a74ee35b2cb..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/regex/regexp-simple.src.js.shot +++ /dev/null @@ -1,204 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript regex regexp-simple.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "raw": "/foo./", - "regex": Object { - "flags": "", - "pattern": "foo.", - }, - "type": "Literal", - "value": /foo\\./, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "regex": Object { - "flags": "", - "pattern": "foo.", - }, - "type": "RegularExpression", - "value": "/foo./", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-extended-escape.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-extended-escape.src.js.shot deleted file mode 100644 index 2e40921f14f2..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-extended-escape.src.js.shot +++ /dev/null @@ -1,204 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript regexUFlag regex-u-extended-escape.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 40, - ], - "raw": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", - "regex": Object { - "flags": "u", - "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", - }, - "type": "Literal", - "value": /\\[\\\\u\\{0000000000000061\\}-\\\\u\\{7A\\}\\]/u, - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 40, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 40, - ], - "regex": Object { - "flags": "u", - "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", - }, - "type": "RegularExpression", - "value": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js.shot deleted file mode 100644 index 947b615da575..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js.shot +++ /dev/null @@ -1,204 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript regexUFlag regex-u-invalid-extended-escape.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 21, - ], - "raw": "/\\\\u{110000}/u", - "regex": Object { - "flags": "u", - "pattern": "\\\\u{110000}", - }, - "type": "Literal", - "value": null, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 21, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 21, - ], - "regex": Object { - "flags": "u", - "pattern": "\\\\u{110000}", - }, - "type": "RegularExpression", - "value": "/\\\\u{110000}/u", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-simple.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-simple.src.js.shot deleted file mode 100644 index 981db5e31386..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/regexUFlag/regex-u-simple.src.js.shot +++ /dev/null @@ -1,204 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript regexUFlag regex-u-simple.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "raw": "/foo/u", - "regex": Object { - "flags": "u", - "pattern": "foo", - }, - "type": "Literal", - "value": /foo/u, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "regex": Object { - "flags": "u", - "pattern": "foo", - }, - "type": "RegularExpression", - "value": "/foo/u", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/regexYFlag/regexp-y-simple.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/regexYFlag/regexp-y-simple.src.js.shot deleted file mode 100644 index b08d9329097f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/regexYFlag/regexp-y-simple.src.js.shot +++ /dev/null @@ -1,204 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript regexYFlag regexp-y-simple.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "raw": "/foo/y", - "regex": Object { - "flags": "y", - "pattern": "foo", - }, - "type": "Literal", - "value": /foo/y, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "regex": Object { - "flags": "y", - "pattern": "foo", - }, - "type": "RegularExpression", - "value": "/foo/y", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/restParams/basic-rest.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/restParams/basic-rest.src.js.shot deleted file mode 100644 index 39322db73254..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/restParams/basic-rest.src.js.shot +++ /dev/null @@ -1,369 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript restParams basic-rest.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 14, - 18, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 0, - 22, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/restParams/class-constructor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/restParams/class-constructor.src.js.shot deleted file mode 100644 index 2901e45bc459..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/restParams/class-constructor.src.js.shot +++ /dev/null @@ -1,421 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript restParams class-constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 41, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 26, - 32, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 25, - 41, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 43, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/restParams/class-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/restParams/class-method.src.js.shot deleted file mode 100644 index 249307c64cd0..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/restParams/class-method.src.js.shot +++ /dev/null @@ -1,421 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript restParams class-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 33, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 33, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 18, - 24, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 17, - 33, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 35, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/restParams/error-no-default.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/restParams/error-no-default.src.js.shot deleted file mode 100644 index 6e86567b8cd3..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/restParams/error-no-default.src.js.shot +++ /dev/null @@ -1,335 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript restParams error-no-default.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": undefined, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 14, - 22, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 0, - 24, - ], - "returnType": undefined, - "type": "TSDeclareFunction", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/restParams/error-not-last.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/restParams/error-not-last.src.js.shot deleted file mode 100644 index 0c78d497d6ea..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/restParams/error-not-last.src.js.shot +++ /dev/null @@ -1,356 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript restParams error-not-last.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": undefined, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 14, - 18, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 23, - ], - "returnType": undefined, - "type": "TSDeclareFunction", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/restParams/func-expression-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/restParams/func-expression-multi.src.js.shot deleted file mode 100644 index f261603beb44..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/restParams/func-expression-multi.src.js.shot +++ /dev/null @@ -1,428 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript restParams func-expression-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 20, - 24, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 8, - 28, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 28, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 16, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/restParams/func-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/restParams/func-expression.src.js.shot deleted file mode 100644 index 1a51980f1189..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/restParams/func-expression.src.js.shot +++ /dev/null @@ -1,371 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript restParams func-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "params": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 18, - 22, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 8, - 26, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 26, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 16, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/restParams/invalid-rest-param.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/restParams/invalid-rest-param.src.js.shot deleted file mode 100644 index ba57015fedbc..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/restParams/invalid-rest-param.src.js.shot +++ /dev/null @@ -1,413 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript restParams invalid-rest-param.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 16, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 14, - 19, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 19, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 0, - 22, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/restParams/single-rest.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/restParams/single-rest.src.js.shot deleted file mode 100644 index 6b61e28e0f02..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/restParams/single-rest.src.js.shot +++ /dev/null @@ -1,312 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript restParams single-rest.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 15, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 0, - 19, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-float-negative.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-float-negative.src.js.shot deleted file mode 100644 index 1dab848b1c8f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-float-negative.src.js.shot +++ /dev/null @@ -1,233 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript simple-literals literal-float-negative.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "raw": "1.5", - "type": "Literal", - "value": 1.5, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "operator": "-", - "prefix": true, - "range": Array [ - 10, - 14, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "-", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Numeric", - "value": "1.5", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-float.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-float.src.js.shot deleted file mode 100644 index 321bd41c275f..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-float.src.js.shot +++ /dev/null @@ -1,196 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript simple-literals literal-float.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "raw": "1.5", - "type": "Literal", - "value": 1.5, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 13, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Numeric", - "value": "1.5", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-null.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-null.src.js.shot deleted file mode 100644 index d3158faf630d..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-null.src.js.shot +++ /dev/null @@ -1,196 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript simple-literals literal-null.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "raw": "null", - "type": "Literal", - "value": null, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Keyword", - "value": "null", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-number-negative.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-number-negative.src.js.shot deleted file mode 100644 index 91d536ffc5cd..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-number-negative.src.js.shot +++ /dev/null @@ -1,233 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript simple-literals literal-number-negative.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "operator": "-", - "prefix": true, - "range": Array [ - 10, - 12, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 12, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "-", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-number.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-number.src.js.shot deleted file mode 100644 index a7d510f263b3..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-number.src.js.shot +++ /dev/null @@ -1,196 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript simple-literals literal-number.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 11, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-string.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-string.src.js.shot deleted file mode 100644 index 9571bcdd0a83..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-string.src.js.shot +++ /dev/null @@ -1,196 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript simple-literals literal-string.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "raw": "'a'", - "type": "Literal", - "value": "a", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 13, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "String", - "value": "'a'", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-undefined.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-undefined.src.js.shot deleted file mode 100644 index 0c399b54fe0b..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/simple-literals/literal-undefined.src.js.shot +++ /dev/null @@ -1,198 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript simple-literals literal-undefined.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "undefined", - "optional": false, - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 19, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - "value": "undefined", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/spread/complex-spread.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/spread/complex-spread.src.js.shot deleted file mode 100644 index 253a15279e6c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/spread/complex-spread.src.js.shot +++ /dev/null @@ -1,1732 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript spread complex-spread.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 102, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 22, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "ka", - "optional": false, - "range": Array [ - 7, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 7, - 9, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "ka", - "optional": false, - "range": Array [ - 7, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "nested", - "optional": false, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 20, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 5, - 22, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 24, - 32, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": "other", - "optional": false, - "range": Array [ - 27, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 92, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 34, - 92, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 92, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 39, - 64, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 57, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "name": "nested2", - "optional": false, - "range": Array [ - 48, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 45, - 55, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 43, - 57, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 63, - "line": 1, - }, - "start": Object { - "column": 62, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 62, - 63, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 63, - "line": 1, - }, - "start": Object { - "column": 59, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 59, - 63, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 42, - 64, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 67, - "line": 1, - }, - "start": Object { - "column": 66, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 66, - 67, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 66, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 66, - 80, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 69, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 71, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 71, - 72, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 71, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 71, - 72, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 71, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 71, - 72, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 78, - "line": 1, - }, - "start": Object { - "column": 77, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 77, - 78, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 78, - "line": 1, - }, - "start": Object { - "column": 74, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 74, - 78, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 69, - 80, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 90, - "line": 1, - }, - "start": Object { - "column": 85, - "line": 1, - }, - }, - "name": "rest2", - "optional": false, - "range": Array [ - 85, - 90, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 90, - "line": 1, - }, - "start": Object { - "column": 82, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 82, - 90, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 37, - 92, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 101, - "line": 1, - }, - "start": Object { - "column": 97, - "line": 1, - }, - }, - "name": "rest", - "optional": false, - "range": Array [ - 97, - 101, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 101, - "line": 1, - }, - "start": Object { - "column": 94, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 94, - 101, - ], - "type": "RestElement", - "typeAnnotation": undefined, - "value": undefined, - }, - ], - "range": Array [ - 1, - 102, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 112, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 1, - 112, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 112, - "line": 1, - }, - "start": Object { - "column": 105, - "line": 1, - }, - }, - "name": "complex", - "optional": false, - "range": Array [ - 105, - 112, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 114, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 114, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 115, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Identifier", - "value": "ka", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "value": "nested", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 32, - ], - "type": "Identifier", - "value": "other", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "range": Array [ - 48, - 55, - ], - "type": "Identifier", - "value": "nested2", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 1, - }, - "start": Object { - "column": 56, - "line": 1, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 59, - "line": 1, - }, - }, - "range": Array [ - 59, - 62, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 63, - "line": 1, - }, - "start": Object { - "column": 62, - "line": 1, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 1, - }, - "start": Object { - "column": 64, - "line": 1, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 67, - "line": 1, - }, - "start": Object { - "column": 66, - "line": 1, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 68, - "line": 1, - }, - "start": Object { - "column": 67, - "line": 1, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 70, - "line": 1, - }, - "start": Object { - "column": 69, - "line": 1, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 71, - "line": 1, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 1, - }, - "start": Object { - "column": 72, - "line": 1, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 74, - "line": 1, - }, - }, - "range": Array [ - 74, - 77, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 78, - "line": 1, - }, - "start": Object { - "column": 77, - "line": 1, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 79, - "line": 1, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 81, - "line": 1, - }, - "start": Object { - "column": 80, - "line": 1, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 85, - "line": 1, - }, - "start": Object { - "column": 82, - "line": 1, - }, - }, - "range": Array [ - 82, - 85, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 90, - "line": 1, - }, - "start": Object { - "column": 85, - "line": 1, - }, - }, - "range": Array [ - 85, - 90, - ], - "type": "Identifier", - "value": "rest2", - }, - Object { - "loc": Object { - "end": Object { - "column": 92, - "line": 1, - }, - "start": Object { - "column": 91, - "line": 1, - }, - }, - "range": Array [ - 91, - 92, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 93, - "line": 1, - }, - "start": Object { - "column": 92, - "line": 1, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 97, - "line": 1, - }, - "start": Object { - "column": 94, - "line": 1, - }, - }, - "range": Array [ - 94, - 97, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 101, - "line": 1, - }, - "start": Object { - "column": 97, - "line": 1, - }, - }, - "range": Array [ - 97, - 101, - ], - "type": "Identifier", - "value": "rest", - }, - Object { - "loc": Object { - "end": Object { - "column": 102, - "line": 1, - }, - "start": Object { - "column": 101, - "line": 1, - }, - }, - "range": Array [ - 101, - 102, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 104, - "line": 1, - }, - "start": Object { - "column": 103, - "line": 1, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 112, - "line": 1, - }, - "start": Object { - "column": 105, - "line": 1, - }, - }, - "range": Array [ - 105, - 112, - ], - "type": "Identifier", - "value": "complex", - }, - Object { - "loc": Object { - "end": Object { - "column": 113, - "line": 1, - }, - "start": Object { - "column": 112, - "line": 1, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 114, - "line": 1, - }, - "start": Object { - "column": 113, - "line": 1, - }, - }, - "range": Array [ - 113, - 114, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/spread/multi-function-call.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/spread/multi-function-call.src.js.shot deleted file mode 100644 index f0166dcd049a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/spread/multi-function-call.src.js.shot +++ /dev/null @@ -1,290 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript spread multi-function-call.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "SpreadElement", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 12, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/spread/not-final-param.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/spread/not-final-param.src.js.shot deleted file mode 100644 index e8b0a543bbf3..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/spread/not-final-param.src.js.shot +++ /dev/null @@ -1,290 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript spread not-final-param.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 9, - ], - "type": "SpreadElement", - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "func", - "optional": false, - "range": Array [ - 0, - 4, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 13, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "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": "func", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/spread/simple-function-call.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/spread/simple-function-call.src.js.shot deleted file mode 100644 index 5d200dab46bf..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/spread/simple-function-call.src.js.shot +++ /dev/null @@ -1,233 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript spread simple-function-call.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 8, - ], - "type": "SpreadElement", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 9, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/deeply-nested.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/templateStrings/deeply-nested.src.js.shot deleted file mode 100644 index 1dca3524497c..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/deeply-nested.src.js.shot +++ /dev/null @@ -1,472 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript templateStrings deeply-nested.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "quasi": Object { - "expressions": Array [ - Object { - "expressions": Array [ - Object { - "left": Object { - "expressions": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 30, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "deeply", - "raw": "deeply", - }, - }, - ], - "range": Array [ - 22, - 30, - ], - "type": "TemplateLiteral", - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "operator": "+", - "range": Array [ - 22, - 35, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 33, - 35, - ], - "type": "ObjectExpression", - }, - "type": "BinaryExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 22, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": "nested ", - "raw": "nested ", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 42, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": " blah", - "raw": " blah", - }, - }, - ], - "range": Array [ - 12, - 42, - ], - "type": "TemplateLiteral", - }, - ], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 12, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": "hello ", - "raw": "hello ", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 44, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "", - "raw": "", - }, - }, - ], - "range": Array [ - 3, - 44, - ], - "type": "TemplateLiteral", - }, - "range": Array [ - 0, - 44, - ], - "tag": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "raw", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "TaggedTemplateExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 46, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "raw", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 12, - ], - "type": "Template", - "value": "\`hello \${", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 22, - ], - "type": "Template", - "value": "\`nested \${", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 30, - ], - "type": "Template", - "value": "\`deeply\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 42, - ], - "type": "Template", - "value": "} blah\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 44, - ], - "type": "Template", - "value": "}\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/error-octal-literal.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/templateStrings/error-octal-literal.src.js.shot deleted file mode 100644 index c0bdaa76c244c0949cd2943710f3ce23eccab3b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2347 zcmd5-!EW0y4BgpZA?V!J&48^yiynIDWhk%=>8%N1#a3OnvgJv1wqWSLPm*ngQDpD1 zOLGVyJ@S!!BIz_G-?#>{YFMjZB#_xh|8AuM{gl13 z9n-n0S|GsdRxsczP*qcE!j+QhT;{;Uxu}3ECN8wf$s*g3TaqQ;x34@0@+TpLZe_8j z*W^wqwkJ>Kh7bhXBP}Xr%&Q$Yc3o5O=c?hwnKL!0Nl0<6E7=%0a6N+cAiG zF-Pm#6mi60xfES(BYrthxnzY&&Rj3>^*cUL4NSqmi7&B}&2yd@#h^bsrYltLAeGJU zM4&$DDGeMtql3ezwCJfLXpS_zZClb$SAnlV75inO zwfS9!@KNFDfJ&GV<46c30``WW#D{+LeVRV#)XYs!++p6nV!Hi z0{0hHWKiSEM(dN;vQs&K9NMJ+c)0GMV7j_N#YVpak=pH)#_M;8Ul^!kjl=1x7_@Ls zGkYkaiF27D^vqF>tT*Z!pQh8xQIB0S?hQXpbX*m5o%I91&IWLZ8SIb`HFdty|JM&u i%}m|0YjWrqNEK1=1`Fr3_tUymvQ(@#2JcCBll%n~rxF$b diff --git a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/escape-characters.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/templateStrings/escape-characters.src.js.shot deleted file mode 100644 index a381e89f5c31..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/escape-characters.src.js.shot +++ /dev/null @@ -1,221 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript templateStrings escape-characters.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "ts", - "optional": false, - "range": Array [ - 4, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expressions": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 39, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "\\\\n\\\\r\\\\b\\\\v\\\\t\\\\f\\\\ -\\\\ -", - "raw": "\\\\\\\\n\\\\\\\\r\\\\\\\\b\\\\\\\\v\\\\\\\\t\\\\\\\\f\\\\\\\\\\\\n\\\\\\\\\\\\r\\\\n", - }, - }, - ], - "range": Array [ - 9, - 39, - ], - "type": "TemplateLiteral", - }, - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 39, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "Identifier", - "value": "ts", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 39, - ], - "type": "Template", - "value": "\`\\\\\\\\n\\\\\\\\r\\\\\\\\b\\\\\\\\v\\\\\\\\t\\\\\\\\f\\\\\\\\\\\\n\\\\\\\\\\\\r\\\\n\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/expressions.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/templateStrings/expressions.src.js.shot deleted file mode 100644 index 4743997f1539..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/expressions.src.js.shot +++ /dev/null @@ -1,693 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript templateStrings expressions.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 9, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "raw": "'Fred'", - "type": "Literal", - "value": "Fred", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 15, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 11, - 26, - ], - "type": "VariableDeclaration", - }, - Object { - "directive": undefined, - "expression": Object { - "expressions": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 51, - 52, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "operator": "+", - "range": Array [ - 51, - 56, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "type": "BinaryExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 28, - 37, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": "Hello ", - "raw": "Hello ", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 38, - 51, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": ". a + 5 = ", - "raw": ". a + 5 = ", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 56, - 58, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "", - "raw": "", - }, - }, - ], - "range": Array [ - 28, - 58, - ], - "type": "TemplateLiteral", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 28, - 59, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 59, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "String", - "value": "'Fred'", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 28, - 37, - ], - "type": "Template", - "value": "\`Hello \${", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 38, - 51, - ], - "type": "Template", - "value": "}. a + 5 = \${", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 56, - 58, - ], - "type": "Template", - "value": "}\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 30, - "line": 4, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/multi-line-template-string.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/templateStrings/multi-line-template-string.src.js.shot deleted file mode 100644 index 9a30e51cc750..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/multi-line-template-string.src.js.shot +++ /dev/null @@ -1,138 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript templateStrings multi-line-template-string.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expressions": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 110, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "The last man on Earth - sat alone in a room. - There was - a knock - on the - door...", - "raw": "The last man on Earth - sat alone in a room. - There was - a knock - on the - door...", - }, - }, - ], - "range": Array [ - 0, - 110, - ], - "type": "TemplateLiteral", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 111, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 111, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 110, - ], - "type": "Template", - "value": "\`The last man on Earth - sat alone in a room. - There was - a knock - on the - door...\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/simple-template-string.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/templateStrings/simple-template-string.src.js.shot deleted file mode 100644 index a1bda1978fcf..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/simple-template-string.src.js.shot +++ /dev/null @@ -1,123 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript templateStrings simple-template-string.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expressions": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 4, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "42", - "raw": "42", - }, - }, - ], - "range": Array [ - 0, - 4, - ], - "type": "TemplateLiteral", - }, - "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": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 4, - ], - "type": "Template", - "value": "\`42\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/single-dollar-sign.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/templateStrings/single-dollar-sign.src.js.shot deleted file mode 100644 index ce91f2b68e8a..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/single-dollar-sign.src.js.shot +++ /dev/null @@ -1,219 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript templateStrings single-dollar-sign.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "ts", - "optional": false, - "range": Array [ - 4, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expressions": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "$", - "raw": "$", - }, - }, - ], - "range": Array [ - 9, - 12, - ], - "type": "TemplateLiteral", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 12, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "Identifier", - "value": "ts", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Template", - "value": "\`$\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/tagged-no-placeholders.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/templateStrings/tagged-no-placeholders.src.js.shot deleted file mode 100644 index 8e394cf8b1ab..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/tagged-no-placeholders.src.js.shot +++ /dev/null @@ -1,180 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript templateStrings tagged-no-placeholders.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "quasi": Object { - "expressions": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 8, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "foo", - "raw": "foo", - }, - }, - ], - "range": Array [ - 3, - 8, - ], - "type": "TemplateLiteral", - }, - "range": Array [ - 0, - 8, - ], - "tag": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "TaggedTemplateExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 8, - ], - "type": "Template", - "value": "\`foo\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/tagged-template-string.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/templateStrings/tagged-template-string.src.js.shot deleted file mode 100644 index 4e7c500f3058..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/templateStrings/tagged-template-string.src.js.shot +++ /dev/null @@ -1,758 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript templateStrings tagged-template-string.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "arguments", - "optional": false, - "range": Array [ - 30, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "name": "console", - "optional": false, - "range": Array [ - 18, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "log", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 18, - 29, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 18, - 40, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 18, - 41, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 43, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "tag", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 43, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "quasi": Object { - "expressions": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 55, - 56, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 71, - 72, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 47, - 55, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": "a is ", - "raw": "a is ", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 56, - 71, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": " while b is ", - "raw": " while b is ", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 72, - 75, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": ".", - "raw": ".", - }, - }, - ], - "range": Array [ - 47, - 75, - ], - "type": "TemplateLiteral", - }, - "range": Array [ - 44, - 75, - ], - "tag": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "name": "tag", - "optional": false, - "range": Array [ - 44, - 47, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "TaggedTemplateExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 44, - 76, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 76, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "tag", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 18, - 25, - ], - "type": "Identifier", - "value": "console", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "log", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 30, - 39, - ], - "type": "Identifier", - "value": "arguments", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 44, - 47, - ], - "type": "Identifier", - "value": "tag", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 47, - 55, - ], - "type": "Template", - "value": "\`a is \${", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 56, - 71, - ], - "type": "Template", - "value": "} while b is \${", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 72, - 75, - ], - "type": "Template", - "value": "}.\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 31, - "line": 4, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/ignored.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/ignored.src.js.shot deleted file mode 100644 index 6fa4ff6603d5..000000000000 --- a/packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/ignored.src.js.shot +++ /dev/null @@ -1,1753 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`javascript unicodeCodePointEscapes ignored.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "raw": "' '", - "type": "Literal", - "value": " ", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 13, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 23, - 26, - ], - "raw": "' '", - "type": "Literal", - "value": " ", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 26, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 15, - 27, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "d", - "optional": false, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 36, - 43, - ], - "raw": "'&'", - "type": "Literal", - "value": "&", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 32, - 43, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 28, - 44, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 51, - 52, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 59, - 76, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 62, - 76, - ], - "raw": "'id=1&group=2'", - "type": "Literal", - "value": "id=1&group=2", - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "name": "g", - "optional": false, - "range": Array [ - 80, - 81, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 80, - 103, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "range": Array [ - 101, - 103, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "h", - "optional": false, - "range": Array [ - 82, - 83, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "optional": false, - "range": Array [ - 82, - 99, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 86, - 99, - ], - "raw": "'�'", - "type": "Literal", - "value": "�", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 81, - 103, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 107, - 108, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 30, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 107, - 135, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 7, - }, - "start": Object { - "column": 28, - "line": 7, - }, - }, - "range": Array [ - 133, - 135, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 30, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "name": "j", - "optional": false, - "range": Array [ - 111, - 112, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "optional": false, - "range": Array [ - 111, - 128, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 115, - 128, - ], - "raw": "'�'", - "type": "Literal", - "value": "�", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 110, - 135, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 55, - 138, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 51, - 138, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 2, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 45, - 139, - ], - "type": "VariableDeclaration", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 144, - 150, - ], - "raw": "'&#x;'", - "type": "Literal", - "value": "&#x;", - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 140, - 141, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "name": "i", - "optional": false, - "range": Array [ - 142, - 143, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 140, - 143, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "optional": false, - "range": Array [ - 140, - 151, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 140, - 152, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 153, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "String", - "value": "' '", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "String", - "value": "' '", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 36, - 43, - ], - "type": "String", - "value": "'&'", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 45, - 50, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 62, - 76, - ], - "type": "String", - "value": "'id=1&group=2'", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Identifier", - "value": "g", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Identifier", - "value": "h", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 86, - 99, - ], - "type": "String", - "value": "'�'", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 21, - "line": 6, - }, - }, - "range": Array [ - 99, - 100, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "range": Array [ - 101, - 102, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 24, - "line": 6, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 25, - "line": 6, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Identifier", - "value": "j", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 113, - 114, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 115, - 128, - ], - "type": "String", - "value": "'�'", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 7, - }, - "start": Object { - "column": 23, - "line": 7, - }, - }, - "range": Array [ - 128, - 129, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 7, - }, - "start": Object { - "column": 25, - "line": 7, - }, - }, - "range": Array [ - 130, - 132, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 7, - }, - "start": Object { - "column": 28, - "line": 7, - }, - }, - "range": Array [ - 133, - 134, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 7, - }, - "start": Object { - "column": 29, - "line": 7, - }, - }, - "range": Array [ - 134, - 135, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 7, - }, - "start": Object { - "column": 30, - "line": 7, - }, - }, - "range": Array [ - 135, - 136, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 137, - 138, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 8, - }, - "start": Object { - "column": 1, - "line": 8, - }, - }, - "range": Array [ - 138, - 139, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 140, - 141, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 1, - "line": 9, - }, - }, - "range": Array [ - 141, - 142, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 142, - 143, - ], - "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 9, - }, - "start": Object { - "column": 3, - "line": 9, - }, - }, - "range": Array [ - 143, - 144, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 144, - 150, - ], - "type": "String", - "value": "'&#x;'", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 9, - }, - "start": Object { - "column": 10, - "line": 9, - }, - }, - "range": Array [ - 150, - 151, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 151, - 152, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js.shot deleted file mode 100644 index 5abb5af01151..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js.shot +++ /dev/null @@ -1,472 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx-useJSXTextNode self-closing-tag-inside-tag.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 11, - 14, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 10, - 17, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 10, - 17, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": " -", - "type": "JSXText", - "value": " -", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "div", - "range": Array [ - 20, - 23, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 18, - 24, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 5, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 24, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "JSXIdentifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "JSXText", - "value": " -", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/test-content.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/test-content.src.js.shot deleted file mode 100644 index 6f5a8d104245..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/test-content.src.js.shot +++ /dev/null @@ -1,318 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx-useJSXTextNode test-content.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 18, - ], - "raw": "@test content", - "type": "JSXText", - "value": "@test content", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 20, - 23, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 18, - 24, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 5, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 24, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 18, - ], - "type": "JSXText", - "value": "@test content", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/attributes.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/attributes.src.js.shot deleted file mode 100644 index 241978d18f6a..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/attributes.src.js.shot +++ /dev/null @@ -1,682 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx attributes.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 39, - ], - "raw": "test", - "type": "JSXText", - "value": "test", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 41, - 44, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 39, - 45, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 5, - 8, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 5, - 14, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "raw": "\\"baz\\"", - "type": "Literal", - "value": "baz", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "qux", - "range": Array [ - 15, - 18, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 15, - 24, - ], - "type": "JSXAttribute", - "value": Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "quz", - "optional": false, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "JSXExpressionContainer", - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "rest", - "optional": false, - "range": Array [ - 29, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 34, - ], - "type": "JSXSpreadAttribute", - }, - ], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 35, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 45, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "JSXIdentifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "JSXText", - "value": "\\"baz\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "JSXIdentifier", - "value": "qux", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "value": "quz", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 33, - ], - "type": "Identifier", - "value": "rest", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 39, - ], - "type": "JSXText", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 44, - ], - "type": "JSXIdentifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/element-keyword-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/element-keyword-name.src.js.shot deleted file mode 100644 index 4df545ff5a6d..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/element-keyword-name.src.js.shot +++ /dev/null @@ -1,810 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx element-keyword-name.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "object", - "range": Array [ - 11, - 17, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 10, - 20, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 10, - 20, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 20, - 25, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "abstract", - "range": Array [ - 26, - 34, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 25, - 37, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 25, - 37, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 37, - 42, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "name": "module", - "range": Array [ - 43, - 49, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 42, - 52, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 42, - 52, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 52, - 53, - ], - "raw": " -", - "type": "JSXText", - "value": " -", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "div", - "range": Array [ - 55, - 58, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 53, - 59, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 5, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 59, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 59, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 60, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "object", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 20, - 25, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 26, - 34, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 37, - 42, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 43, - 49, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "JSXText", - "value": " -", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 55, - 58, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/embedded-comment.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/embedded-comment.src.js.shot deleted file mode 100644 index da0918624ae2..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/embedded-comment.src.js.shot +++ /dev/null @@ -1,370 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx embedded-comment.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 27, - ], - "type": "JSXEmptyExpression", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 28, - ], - "type": "JSXExpressionContainer", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 30, - 31, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 28, - 32, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 3, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 32, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 27, - ], - "type": "Block", - "value": " this is a comment ", - }, - ], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/embedded-conditional.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/embedded-conditional.src.js.shot deleted file mode 100644 index ee0ecc91d1ff..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/embedded-conditional.src.js.shot +++ /dev/null @@ -1,667 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx embedded-conditional.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 3, - 24, - ], - "type": "JSXAttribute", - "value": Object { - "expression": Object { - "alternate": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "d", - "range": Array [ - 19, - 20, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 18, - 23, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 18, - 23, - ], - "type": "JSXElement", - }, - "consequent": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 11, - 12, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 10, - 15, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 10, - 15, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 23, - ], - "test": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "ConditionalExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 24, - ], - "type": "JSXExpressionContainer", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 27, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 27, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "JSXIdentifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/embedded-invalid-js-identifier.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/embedded-invalid-js-identifier.src.js.shot deleted file mode 100644 index fc3cd5e29f87..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/embedded-invalid-js-identifier.src.js.shot +++ /dev/null @@ -1,447 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx embedded-invalid-js-identifier.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "br", - "range": Array [ - 6, - 8, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 5, - 11, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 5, - 11, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 35, - ], - "raw": "7x invalid-js-identifier", - "type": "JSXText", - "value": "7x invalid-js-identifier", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 37, - 40, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 35, - 41, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 5, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 41, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "JSXIdentifier", - "value": "br", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 35, - ], - "type": "JSXText", - "value": "7x invalid-js-identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 40, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/empty-placeholder.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/empty-placeholder.src.js.shot deleted file mode 100644 index 539fa714aa97..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/empty-placeholder.src.js.shot +++ /dev/null @@ -1,351 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx empty-placeholder.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 4, - ], - "type": "JSXEmptyExpression", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 5, - ], - "type": "JSXExpressionContainer", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 7, - 8, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 5, - 9, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 3, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 9, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-ignored.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-ignored.src.js.shot deleted file mode 100644 index fb1976cfcff4..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-ignored.src.js.shot +++ /dev/null @@ -1,1055 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx escape-patterns-ignored.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "b", - "range": Array [ - 5, - 6, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 5, - 12, - ], - "type": "JSXAttribute", - "value": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 8, - 11, - ], - "raw": "' '", - "type": "Literal", - "value": " ", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "JSXExpressionContainer", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "c", - "range": Array [ - 15, - 16, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 15, - 20, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 17, - 20, - ], - "raw": "\\" \\"", - "type": "Literal", - "value": " ", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "name": "d", - "range": Array [ - 23, - 24, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 23, - 34, - ], - "type": "JSXAttribute", - "value": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 26, - 33, - ], - "raw": "'&'", - "type": "Literal", - "value": "&", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 25, - 34, - ], - "type": "JSXExpressionContainer", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "e", - "range": Array [ - 37, - 38, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 37, - 53, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 39, - 53, - ], - "raw": "\\"id=1&group=2\\"", - "type": "Literal", - "value": "id=1&group=2", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "name": "f", - "range": Array [ - 56, - 57, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 56, - 71, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 58, - 71, - ], - "raw": "\\"�\\"", - "type": "Literal", - "value": "�", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "name": "g", - "range": Array [ - 74, - 75, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 74, - 85, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 76, - 85, - ], - "raw": "\\"{*;\\"", - "type": "Literal", - "value": "{*;", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "name": "h", - "range": Array [ - 88, - 89, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 88, - 96, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 90, - 96, - ], - "raw": "\\"&#x;\\"", - "type": "Literal", - "value": "&#x;", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 99, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 99, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 100, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 101, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "String", - "value": "' '", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "JSXText", - "value": "\\" \\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "JSXIdentifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 26, - 33, - ], - "type": "String", - "value": "'&'", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "JSXIdentifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 39, - 53, - ], - "type": "JSXText", - "value": "\\"id=1&group=2\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "JSXIdentifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 58, - 71, - ], - "type": "JSXText", - "value": "\\"�\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "JSXIdentifier", - "value": "g", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 76, - 85, - ], - "type": "JSXText", - "value": "\\"{*;\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "JSXIdentifier", - "value": "h", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 8, - }, - "start": Object { - "column": 3, - "line": 8, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 90, - 96, - ], - "type": "JSXText", - "value": "\\"&#x;\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 1, - "line": 9, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 99, - 100, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-unknown.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-unknown.src.js.shot deleted file mode 100644 index aeeb7caeb03b..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-unknown.src.js.shot +++ /dev/null @@ -1,1722 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx escape-patterns-unknown.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 3, - 20, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 20, - ], - "raw": "\\"¬anentity;\\"", - "type": "Literal", - "value": "¬anentity;", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 23, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 23, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "b", - "range": Array [ - 28, - 29, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 28, - 36, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "raw": "\\"&##;\\"", - "type": "Literal", - "value": "&##;", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "name": "b", - "range": Array [ - 26, - 27, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 25, - 39, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 25, - 39, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 25, - 40, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "name": "b", - "range": Array [ - 44, - 45, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 44, - 57, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 46, - 57, - ], - "raw": "\\"&x01FZZZ;\\"", - "type": "Literal", - "value": "&x01FZZZ;", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "name": "b", - "range": Array [ - 42, - 43, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 41, - 60, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 41, - 60, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 41, - 61, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 65, - 70, - ], - "raw": "&abc;", - "type": "JSXText", - "value": "&abc;", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "name": "c", - "range": Array [ - 72, - 73, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 70, - 74, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "name": "c", - "range": Array [ - 63, - 64, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 62, - 65, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 62, - 74, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 62, - 75, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 79, - 92, - ], - "raw": "¬anentity;", - "type": "JSXText", - "value": "¬anentity;", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "name": "d", - "range": Array [ - 94, - 95, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 92, - 96, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "name": "d", - "range": Array [ - 77, - 78, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 76, - 79, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 76, - 96, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 76, - 97, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 101, - 105, - ], - "raw": "&#x;", - "type": "JSXText", - "value": "&#x;", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "e", - "range": Array [ - 107, - 108, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 105, - 109, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "name": "e", - "range": Array [ - 99, - 100, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 98, - 101, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 98, - 109, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 98, - 110, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 111, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 20, - ], - "type": "JSXText", - "value": "\\"¬anentity;\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "JSXText", - "value": "\\"&##;\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 46, - 57, - ], - "type": "JSXText", - "value": "\\"&x01FZZZ;\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 65, - 70, - ], - "type": "JSXText", - "value": "&abc;", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "JSXIdentifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 79, - 92, - ], - "type": "JSXText", - "value": "¬anentity;", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 93, - 94, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "JSXIdentifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "range": Array [ - 99, - 100, - ], - "type": "JSXIdentifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 100, - 101, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 101, - 105, - ], - "type": "JSXText", - "value": "&#x;", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "JSXIdentifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-valid.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-valid.src.js.shot deleted file mode 100644 index cc098930c42a..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-valid.src.js.shot +++ /dev/null @@ -1,541 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx escape-patterns-valid.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 34, - ], - "raw": " -   -", - "type": "JSXText", - "value": " -   -", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "a", - "range": Array [ - 36, - 37, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 34, - 38, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 3, - 12, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 12, - ], - "raw": "\\"&\\"", - "type": "Literal", - "value": "&", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 13, - 14, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 13, - 23, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 23, - ], - "raw": "\\"{\\"", - "type": "Literal", - "value": "{", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 24, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 38, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 12, - ], - "type": "JSXText", - "value": "\\"&\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 23, - ], - "type": "JSXText", - "value": "\\"{\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 34, - ], - "type": "JSXText", - "value": " -   -", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/escape-patters-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/escape-patters-multi.src.js.shot deleted file mode 100644 index cd171955f961..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/escape-patters-multi.src.js.shot +++ /dev/null @@ -1,427 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx escape-patters-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 44, - ], - "raw": "  test", - "type": "JSXText", - "value": "  test", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 46, - 47, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 44, - 48, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "href", - "range": Array [ - 3, - 7, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 3, - 32, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 32, - ], - "raw": "\\"test=1&bar=1{\\"", - "type": "Literal", - "value": "test=1&bar=1{", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 33, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 48, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 49, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 7, - ], - "type": "JSXIdentifier", - "value": "href", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 32, - ], - "type": "JSXText", - "value": "\\"test=1&bar=1{\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 44, - ], - "type": "JSXText", - "value": "  test", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-value-with-dots.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-value-with-dots.src.js.shot deleted file mode 100644 index fd09316ce466..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-value-with-dots.src.js.shot +++ /dev/null @@ -1,492 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx invalid-namespace-value-with-dots.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 11, - 12, - ], - "type": "JSXIdentifier", - }, - "namespace": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 9, - 12, - ], - "type": "JSXNamespacedName", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 13, - 14, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 9, - 14, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 7, - 15, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - }, - "namespace": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXNamespacedName", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 5, - 6, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 6, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 0, - 7, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 15, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "a:b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "JSXIdentifier", - "value": "a:b", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/japanese-characters.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/japanese-characters.src.js.shot deleted file mode 100644 index fac1b442189a..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/japanese-characters.src.js.shot +++ /dev/null @@ -1,280 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx japanese-characters.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "日本語", - "range": Array [ - 7, - 10, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 5, - 11, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "日本語", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 5, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 11, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "日本語", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "JSXIdentifier", - "value": "日本語", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/less-than-operator.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/less-than-operator.src.js.shot deleted file mode 100644 index 9a0153704134..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/less-than-operator.src.js.shot +++ /dev/null @@ -1,303 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx less-than-operator.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 2, - 5, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 8, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 1, - 8, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "<", - "range": Array [ - 0, - 13, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 5, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/member-expression-this.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/member-expression-this.src.js.shot deleted file mode 100644 index 3a7e8f2e7237..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/member-expression-this.src.js.shot +++ /dev/null @@ -1,570 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx member-expression-this.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "this", - "range": Array [ - 1, - 5, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "state", - "range": Array [ - 6, - 11, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 11, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "Component", - "range": Array [ - 12, - 21, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 21, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 0, - 24, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 24, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "name": "this", - "range": Array [ - 27, - 31, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "Component", - "range": Array [ - 32, - 41, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 27, - 41, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 26, - 44, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 26, - 44, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 26, - 45, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 46, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 5, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 11, - ], - "type": "JSXIdentifier", - "value": "state", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 21, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 32, - 41, - ], - "type": "JSXIdentifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/member-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/member-expression.src.js.shot deleted file mode 100644 index 596329f458b3..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/member-expression.src.js.shot +++ /dev/null @@ -1,404 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx member-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 7, - 8, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 9, - 10, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 7, - 10, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 5, - 11, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 0, - 5, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 11, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/multiple-blank-spaces.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/multiple-blank-spaces.src.js.shot deleted file mode 100644 index d7b71e4c67ee..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/multiple-blank-spaces.src.js.shot +++ /dev/null @@ -1,318 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx multiple-blank-spaces.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 7, - ], - "raw": " ", - "type": "JSXText", - "value": " ", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 7, - 11, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 3, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 11, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 7, - ], - "type": "JSXText", - "value": " ", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/namespace-this-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/namespace-this-name.src.js.shot deleted file mode 100644 index 7e0f5295c124..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/namespace-this-name.src.js.shot +++ /dev/null @@ -1,227 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx namespace-this-name.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 6, - 9, - ], - "type": "JSXIdentifier", - }, - "namespace": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "this", - "range": Array [ - 1, - 5, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 9, - ], - "type": "JSXNamespacedName", - }, - "range": Array [ - 0, - 12, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 12, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "JSXIdentifier", - "value": "this:bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot deleted file mode 100644 index 9b4e0acdb682..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot +++ /dev/null @@ -1,938 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx namespaced-attribute-and-value-inserted.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": " ", - "type": "JSXText", - "value": " ", - }, - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "value", - "optional": false, - "range": Array [ - 17, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "JSXExpressionContainer", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "raw": " ", - "type": "JSXText", - "value": " ", - }, - Object { - "children": Array [ - Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 28, - 29, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 27, - 32, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 27, - 32, - ], - "type": "JSXElement", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 34, - 35, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 32, - 36, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 25, - 26, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 24, - 27, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 24, - 36, - ], - "type": "JSXElement", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 38, - 39, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 36, - 40, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 5, - 8, - ], - "type": "JSXIdentifier", - }, - "namespace": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "n", - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 3, - 8, - ], - "type": "JSXNamespacedName", - }, - "range": Array [ - 3, - 14, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "raw": "\\"bar\\"", - "type": "Literal", - "value": "bar", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 15, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 40, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 8, - ], - "type": "JSXIdentifier", - "value": "n:foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "JSXText", - "value": "\\"bar\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "JSXText", - "value": " ", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 22, - ], - "type": "Identifier", - "value": "value", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "JSXText", - "value": " ", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/namespaced-name-and-attribute.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/namespaced-name-and-attribute.src.js.shot deleted file mode 100644 index 9b209cf16334..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/namespaced-name-and-attribute.src.js.shot +++ /dev/null @@ -1,317 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx namespaced-name-and-attribute.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "v", - "range": Array [ - 7, - 8, - ], - "type": "JSXIdentifier", - }, - "namespace": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "n", - "range": Array [ - 5, - 6, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 5, - 8, - ], - "type": "JSXNamespacedName", - }, - "range": Array [ - 5, - 8, - ], - "type": "JSXAttribute", - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - }, - "namespace": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "n", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXNamespacedName", - }, - "range": Array [ - 0, - 11, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 11, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "n:a", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "JSXIdentifier", - "value": "n:v", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-inside-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-inside-tag.src.js.shot deleted file mode 100644 index 921f92dc5b73..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-inside-tag.src.js.shot +++ /dev/null @@ -1,472 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx self-closing-tag-inside-tag.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 11, - 14, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 10, - 17, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 10, - 17, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": " -", - "type": "JSXText", - "value": " -", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "div", - "range": Array [ - 20, - 23, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 18, - 24, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 5, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 24, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "JSXIdentifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "JSXText", - "value": " -", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag.src.js.shot deleted file mode 100644 index 69decc59f4a7..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag.src.js.shot +++ /dev/null @@ -1,192 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx self-closing-tag.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 5, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 5, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/shorthand-fragment-with-child.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/shorthand-fragment-with-child.src.js.shot deleted file mode 100644 index 83610f13eb69..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/shorthand-fragment-with-child.src.js.shot +++ /dev/null @@ -1,317 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx shorthand-fragment-with-child.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 3, - 6, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 2, - 9, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 2, - 9, - ], - "type": "JSXElement", - }, - ], - "closingFragment": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "JSXClosingFragment", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingFragment": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 2, - ], - "type": "JSXOpeningFragment", - }, - "range": Array [ - 0, - 12, - ], - "type": "JSXFragment", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 6, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/shorthand-fragment.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/shorthand-fragment.src.js.shot deleted file mode 100644 index 40eb0c61e8dd..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/shorthand-fragment.src.js.shot +++ /dev/null @@ -1,187 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx shorthand-fragment.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingFragment": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 5, - ], - "type": "JSXClosingFragment", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingFragment": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 2, - ], - "type": "JSXOpeningFragment", - }, - "range": Array [ - 0, - 5, - ], - "type": "JSXFragment", - }, - "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": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/spread-child.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/spread-child.src.js.shot deleted file mode 100644 index 9eca921ea7d7..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/spread-child.src.js.shot +++ /dev/null @@ -1,426 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx spread-child.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "expression": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - ], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 13, - ], - "type": "JSXSpreadChild", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 15, - 18, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 13, - 19, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 5, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 19, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/spread-operator-attribute-and-regular-attribute.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/spread-operator-attribute-and-regular-attribute.src.js.shot deleted file mode 100644 index a2d98db8d7d4..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/spread-operator-attribute-and-regular-attribute.src.js.shot +++ /dev/null @@ -1,411 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx spread-operator-attribute-and-regular-attribute.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "props", - "optional": false, - "range": Array [ - 9, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 15, - ], - "type": "JSXSpreadAttribute", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "post", - "range": Array [ - 16, - 20, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 16, - 32, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 32, - ], - "raw": "\\"attribute\\"", - "type": "Literal", - "value": "attribute", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 35, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 35, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Identifier", - "value": "props", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 20, - ], - "type": "JSXIdentifier", - "value": "post", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 32, - ], - "type": "JSXText", - "value": "\\"attribute\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/spread-operator-attributes.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/spread-operator-attributes.src.js.shot deleted file mode 100644 index 9f06bd404b65..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/spread-operator-attributes.src.js.shot +++ /dev/null @@ -1,303 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx spread-operator-attributes.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "props", - "optional": false, - "range": Array [ - 9, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 15, - ], - "type": "JSXSpreadAttribute", - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 18, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 18, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Identifier", - "value": "props", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-dots.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-dots.src.js.shot deleted file mode 100644 index e7049389e4b5..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-dots.src.js.shot +++ /dev/null @@ -1,422 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx tag-names-with-dots.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 7, - 8, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 9, - 10, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 7, - 10, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 5, - 11, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 0, - 5, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 11, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots-multi.src.js.shot deleted file mode 100644 index 797219d3f6e9..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots-multi.src.js.shot +++ /dev/null @@ -1,1714 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx tag-names-with-multi-dots-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "name": "this", - "range": Array [ - 45, - 49, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "name": "const", - "range": Array [ - 50, - 55, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 45, - 55, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "name": "declare", - "range": Array [ - 56, - 63, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 45, - 63, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 2, - }, - "start": Object { - "column": 50, - "line": 2, - }, - }, - "name": "static", - "range": Array [ - 64, - 70, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 45, - 70, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 43, - 71, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "this", - "range": Array [ - 17, - 21, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "const", - "range": Array [ - 22, - 27, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 17, - 27, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "declare", - "range": Array [ - 28, - 35, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 17, - 35, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "static", - "range": Array [ - 36, - 42, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 17, - 42, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 16, - 43, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 16, - 71, - ], - "type": "JSXElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 57, - "line": 2, - }, - }, - "range": Array [ - 71, - 72, - ], - "raw": " -", - "type": "JSXText", - "value": " -", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "a", - "range": Array [ - 74, - 75, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "b", - "range": Array [ - 76, - 77, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 74, - 77, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "c", - "range": Array [ - 78, - 79, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 74, - 79, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "d", - "range": Array [ - 80, - 81, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 74, - 81, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "name": "e", - "range": Array [ - 82, - 83, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 74, - 83, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "name": "f", - "range": Array [ - 84, - 85, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 74, - 85, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 72, - 86, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 5, - 6, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 6, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "d", - "range": Array [ - 7, - 8, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 8, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "e", - "range": Array [ - 9, - 10, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 10, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "f", - "range": Array [ - 11, - 12, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 12, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 0, - 13, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 86, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 87, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 88, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "JSXIdentifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "JSXIdentifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "JSXIdentifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 22, - 27, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 28, - 35, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "Identifier", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 45, - 49, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 50, - 55, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 56, - 63, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 2, - }, - "start": Object { - "column": 49, - "line": 2, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 2, - }, - "start": Object { - "column": 50, - "line": 2, - }, - }, - "range": Array [ - 64, - 70, - ], - "type": "Identifier", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 56, - "line": 2, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 57, - "line": 2, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "JSXText", - "value": " -", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "JSXIdentifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "JSXIdentifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "JSXIdentifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots.src.js.shot deleted file mode 100644 index 8aa9f0436a79..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots.src.js.shot +++ /dev/null @@ -1,564 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx tag-names-with-multi-dots.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 11, - 12, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 9, - 12, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 13, - 14, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 9, - 14, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 7, - 15, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXMemberExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 5, - 6, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 1, - 6, - ], - "type": "JSXMemberExpression", - }, - "range": Array [ - 0, - 7, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 15, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "JSXIdentifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "JSXIdentifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "JSXIdentifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/test-content.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/test-content.src.js.shot deleted file mode 100644 index 4e1a62785ccd..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/test-content.src.js.shot +++ /dev/null @@ -1,318 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx test-content.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 18, - ], - "raw": "@test content", - "type": "JSXText", - "value": "@test content", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 20, - 23, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 18, - 24, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 5, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 24, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 18, - ], - "type": "JSXText", - "value": "@test content", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/jsx/trailing-spread-operator-attribute.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/trailing-spread-operator-attribute.src.js.shot deleted file mode 100644 index d5bb5fd7fc6e..000000000000 --- a/packages/typescript-estree/tests/snapshots/jsx/trailing-spread-operator-attribute.src.js.shot +++ /dev/null @@ -1,607 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx trailing-spread-operator-attribute.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 49, - 52, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 47, - 53, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "pre", - "range": Array [ - 5, - 8, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 5, - 18, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 18, - ], - "raw": "\\"leading\\"", - "type": "Literal", - "value": "leading", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "pre2", - "range": Array [ - 19, - 23, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 19, - 35, - ], - "type": "JSXAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 35, - ], - "raw": "\\"attribute\\"", - "type": "Literal", - "value": "attribute", - }, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "name": "props", - "optional": false, - "range": Array [ - 40, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 46, - ], - "type": "JSXSpreadAttribute", - }, - ], - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "div", - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 47, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 0, - 53, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 54, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 54, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "JSXIdentifier", - "value": "pre", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 18, - ], - "type": "JSXText", - "value": "\\"leading\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 23, - ], - "type": "JSXIdentifier", - "value": "pre2", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 35, - ], - "type": "JSXText", - "value": "\\"attribute\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 40, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 45, - ], - "type": "Identifier", - "value": "props", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 52, - ], - "type": "JSXIdentifier", - "value": "div", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 52, - "line": 1, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/tsx/generic-jsx-element.src.tsx.shot b/packages/typescript-estree/tests/snapshots/tsx/generic-jsx-element.src.tsx.shot deleted file mode 100644 index acc324cfad13..000000000000 --- a/packages/typescript-estree/tests/snapshots/tsx/generic-jsx-element.src.tsx.shot +++ /dev/null @@ -1,425 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`tsx generic-jsx-element.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": null, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "data", - "range": Array [ - 21, - 25, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 21, - 30, - ], - "type": "JSXAttribute", - "value": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "raw": "12", - "type": "Literal", - "value": 12, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "JSXExpressionContainer", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "MyComponent", - "range": Array [ - 1, - 12, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 33, - ], - "selfClosing": true, - "type": "JSXOpeningElement", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 19, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 12, - 20, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "range": Array [ - 0, - 33, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 12, - ], - "type": "JSXIdentifier", - "value": "MyComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 19, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "JSXIdentifier", - "value": "data", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "type": "Numeric", - "value": "12", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/tsx/generic-jsx-opening-element.src.tsx.shot b/packages/typescript-estree/tests/snapshots/tsx/generic-jsx-opening-element.src.tsx.shot deleted file mode 100644 index d38d0c85cd38..000000000000 --- a/packages/typescript-estree/tests/snapshots/tsx/generic-jsx-opening-element.src.tsx.shot +++ /dev/null @@ -1,513 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`tsx generic-jsx-opening-element.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "children": Array [], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "name": "MyComponent", - "range": Array [ - 33, - 44, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 31, - 45, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "openingElement": Object { - "attributes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "data", - "range": Array [ - 21, - 25, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 21, - 30, - ], - "type": "JSXAttribute", - "value": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "raw": "12", - "type": "Literal", - "value": 12, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "JSXExpressionContainer", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "MyComponent", - "range": Array [ - 1, - 12, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 0, - 31, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 19, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 12, - 20, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "range": Array [ - 0, - 45, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 46, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 12, - ], - "type": "JSXIdentifier", - "value": "MyComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 19, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "JSXIdentifier", - "value": "data", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 29, - ], - "type": "Numeric", - "value": "12", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 44, - ], - "type": "JSXIdentifier", - "value": "MyComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/tsx/react-typed-props.src.tsx.shot b/packages/typescript-estree/tests/snapshots/tsx/react-typed-props.src.tsx.shot deleted file mode 100644 index ba034cff1161..000000000000 --- a/packages/typescript-estree/tests/snapshots/tsx/react-typed-props.src.tsx.shot +++ /dev/null @@ -1,1389 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`tsx react-typed-props.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 30, - ], - "raw": "'react'", - "type": "Literal", - "value": "react", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "React", - "optional": false, - "range": Array [ - 12, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 7, - 17, - ], - "type": "ImportNamespaceSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Props", - "optional": false, - "range": Array [ - 36, - 41, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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 { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "title", - "optional": false, - "range": Array [ - 48, - 53, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 48, - 61, - ], - "readonly": false, - "static": false, - "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", - }, - }, - }, - ], - "range": Array [ - 44, - 63, - ], - "type": "TSTypeLiteral", - }, - "typeParameters": undefined, - }, - Object { - "declaration": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "children": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 128, - 135, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 7, - "line": 9, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 7, - "line": 9, - }, - }, - "name": "props", - "optional": false, - "range": Array [ - 136, - 141, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 13, - "line": 9, - }, - }, - "name": "title", - "optional": false, - "range": Array [ - 142, - 147, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 136, - 147, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 9, - }, - }, - "range": Array [ - 135, - 148, - ], - "type": "JSXExpressionContainer", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 10, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "range": Array [ - 148, - 153, - ], - "raw": " - ", - "type": "JSXText", - "value": " - ", - }, - ], - "closingElement": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 10, - }, - "start": Object { - "column": 6, - "line": 10, - }, - }, - "name": "h1", - "range": Array [ - 155, - 157, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 153, - 158, - ], - "type": "JSXClosingElement", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "openingElement": Object { - "attributes": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "name": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 5, - "line": 8, - }, - }, - "name": "h1", - "range": Array [ - 125, - 127, - ], - "type": "JSXIdentifier", - }, - "range": Array [ - 124, - 128, - ], - "selfClosing": false, - "type": "JSXOpeningElement", - "typeParameters": undefined, - }, - "range": Array [ - 124, - 158, - ], - "type": "JSXElement", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 11, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 111, - 162, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 42, - "line": 6, - }, - }, - "range": Array [ - 107, - 164, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 6, - }, - "start": Object { - "column": 24, - "line": 6, - }, - }, - "name": "App", - "optional": false, - "range": Array [ - 89, - 92, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 15, - "line": 6, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 6, - }, - "start": Object { - "column": 28, - "line": 6, - }, - }, - "name": "props", - "optional": false, - "range": Array [ - 93, - 105, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 6, - }, - "start": Object { - "column": 33, - "line": 6, - }, - }, - "range": Array [ - 98, - 105, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 6, - }, - "start": Object { - "column": 35, - "line": 6, - }, - }, - "range": Array [ - 100, - 105, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 6, - }, - "start": Object { - "column": 35, - "line": 6, - }, - }, - "name": "Props", - "optional": false, - "range": Array [ - 100, - 105, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 80, - 164, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 65, - 164, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 164, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 17, - ], - "type": "Identifier", - "value": "React", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 30, - ], - "type": "String", - "value": "'react'", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 31, - 35, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 36, - 41, - ], - "type": "Identifier", - "value": "Props", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 48, - 53, - ], - "type": "Identifier", - "value": "title", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 65, - 71, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 72, - 79, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 15, - "line": 6, - }, - }, - "range": Array [ - 80, - 88, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 6, - }, - "start": Object { - "column": 24, - "line": 6, - }, - }, - "range": Array [ - 89, - 92, - ], - "type": "Identifier", - "value": "App", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 6, - }, - "start": Object { - "column": 27, - "line": 6, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 6, - }, - "start": Object { - "column": 28, - "line": 6, - }, - }, - "range": Array [ - 93, - 98, - ], - "type": "Identifier", - "value": "props", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 6, - }, - "start": Object { - "column": 33, - "line": 6, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 6, - }, - "start": Object { - "column": 35, - "line": 6, - }, - }, - "range": Array [ - 100, - 105, - ], - "type": "Identifier", - "value": "Props", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 6, - }, - "start": Object { - "column": 40, - "line": 6, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 6, - }, - "start": Object { - "column": 42, - "line": 6, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 111, - 117, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "range": Array [ - 118, - 119, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 5, - "line": 8, - }, - }, - "range": Array [ - 125, - 127, - ], - "type": "JSXIdentifier", - "value": "h1", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "range": Array [ - 127, - 128, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 128, - 135, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 9, - }, - }, - "range": Array [ - 135, - 136, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 7, - "line": 9, - }, - }, - "range": Array [ - 136, - 141, - ], - "type": "JSXIdentifier", - "value": "props", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "range": Array [ - 141, - 142, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 13, - "line": 9, - }, - }, - "range": Array [ - 142, - 147, - ], - "type": "JSXIdentifier", - "value": "title", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 18, - "line": 9, - }, - }, - "range": Array [ - 147, - 148, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 10, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "range": Array [ - 148, - 153, - ], - "type": "JSXText", - "value": " - ", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "range": Array [ - 153, - 154, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 10, - }, - "start": Object { - "column": 5, - "line": 10, - }, - }, - "range": Array [ - 154, - 155, - ], - "type": "Punctuator", - "value": "/", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 10, - }, - "start": Object { - "column": 6, - "line": 10, - }, - }, - "range": Array [ - 155, - 157, - ], - "type": "JSXIdentifier", - "value": "h1", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "range": Array [ - 157, - 158, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 11, - }, - "start": Object { - "column": 2, - "line": 11, - }, - }, - "range": Array [ - 161, - 162, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 12, - }, - }, - "range": Array [ - 163, - 164, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts.shot deleted file mode 100644 index 5ee9949c8b7c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts.shot +++ /dev/null @@ -1,312 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript babylon-convergence type-parameter-whitespace-loc.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 24, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 13, - 14, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 10, - 19, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/babylon-convergence/type-parameters.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/babylon-convergence/type-parameters.src.ts.shot deleted file mode 100644 index 370cfc2ff602..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/babylon-convergence/type-parameters.src.ts.shot +++ /dev/null @@ -1,416 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript babylon-convergence type-parameters.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 42, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 42, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 27, - ], - "type": "TSObjectKeyword", - }, - "default": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "TSObjectKeyword", - }, - "in": false, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 11, - 36, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 10, - 37, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 20, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 27, - ], - "type": "Identifier", - "value": "object", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Identifier", - "value": "object", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-constructor.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-constructor.src.ts.shot deleted file mode 100644 index c859e255d4bb..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-constructor.src.ts.shot +++ /dev/null @@ -1,382 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics abstract-class-with-abstract-constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "abstract": true, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 52, - 63, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 43, - 66, - ], - "static": false, - "type": "TSAbstractMethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 63, - 66, - ], - "returnType": undefined, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 68, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "AbstractSocket", - "optional": false, - "range": Array [ - 22, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 68, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 68, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 68, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 36, - ], - "type": "Identifier", - "value": "AbstractSocket", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 43, - 51, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 52, - 63, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-method.src.ts.shot deleted file mode 100644 index e800d9256e19..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-method.src.ts.shot +++ /dev/null @@ -1,562 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics abstract-class-with-abstract-method.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "abstract": true, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "createSocket", - "optional": false, - "range": Array [ - 52, - 64, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 43, - 84, - ], - "static": false, - "type": "TSAbstractMethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 64, - 84, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 66, - 83, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 68, - 83, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "name": "Promise", - "optional": false, - "range": Array [ - 68, - 75, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 37, - "line": 2, - }, - }, - "range": Array [ - 76, - 82, - ], - "type": "TSStringKeyword", - }, - ], - "range": Array [ - 75, - 83, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 86, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "AbstractSocket", - "optional": false, - "range": Array [ - 22, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 86, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 86, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 86, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 36, - ], - "type": "Identifier", - "value": "AbstractSocket", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 43, - 51, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 52, - 64, - ], - "type": "Identifier", - "value": "createSocket", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 68, - 75, - ], - "type": "Identifier", - "value": "Promise", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 37, - "line": 2, - }, - }, - "range": Array [ - 76, - 82, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 2, - }, - "start": Object { - "column": 43, - "line": 2, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot deleted file mode 100644 index e9b5b3aaf8d3..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot +++ /dev/null @@ -1,456 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics abstract-class-with-abstract-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": true, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 25, - 38, - ], - "readonly": false, - "static": false, - "type": "TSAbstractPropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 43, - 64, - ], - "readonly": false, - "static": false, - "type": "TSAbstractPropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 55, - 63, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 57, - 63, - ], - "type": "TSNumberKeyword", - }, - }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 66, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 66, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 67, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 33, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 43, - 51, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 57, - 63, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot deleted file mode 100644 index 60776d29fa33..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot +++ /dev/null @@ -1,389 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics abstract-class-with-abstract-readonly-property.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": true, - "body": Object { - "body": Array [ - Object { - "accessibility": "public", - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 48, - 51, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 23, - 60, - ], - "readonly": true, - "static": false, - "type": "TSAbstractPropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 51, - 59, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 62, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 62, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 63, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 30, - 38, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 39, - 47, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 48, - 51, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-static-constructor.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-static-constructor.src.ts.shot deleted file mode 100644 index 503adfa42c70..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-static-constructor.src.ts.shot +++ /dev/null @@ -1,400 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics abstract-class-with-abstract-static-constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "abstract": true, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 57, - 68, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 41, - 71, - ], - "static": true, - "type": "TSAbstractMethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 68, - 71, - ], - "returnType": undefined, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 73, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "AbstractSocket", - "optional": false, - "range": Array [ - 22, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 73, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 73, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 74, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 36, - ], - "type": "Identifier", - "value": "AbstractSocket", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 41, - 49, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 50, - 56, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 57, - 68, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot deleted file mode 100644 index fa5364f6d5c3..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot +++ /dev/null @@ -1,1185 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics abstract-class-with-declare-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": true, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "prop1", - "optional": false, - "range": Array [ - 45, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 37, - 59, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 50, - 58, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 52, - 58, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "name": "prop2", - "optional": false, - "range": Array [ - 79, - 84, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 62, - 93, - ], - "readonly": false, - "static": false, - "type": "TSAbstractPropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 84, - 92, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 86, - 92, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "public", - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "name": "prop3", - "optional": false, - "range": Array [ - 120, - 125, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 96, - 134, - ], - "readonly": false, - "static": false, - "type": "TSAbstractPropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 4, - }, - "start": Object { - "column": 31, - "line": 4, - }, - }, - "range": Array [ - 125, - 133, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 4, - }, - "start": Object { - "column": 33, - "line": 4, - }, - }, - "range": Array [ - 127, - 133, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 5, - }, - "start": Object { - "column": 28, - "line": 5, - }, - }, - "name": "prop4", - "optional": false, - "range": Array [ - 163, - 168, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 137, - 177, - ], - "readonly": true, - "static": false, - "type": "TSAbstractPropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 5, - }, - "start": Object { - "column": 33, - "line": 5, - }, - }, - "range": Array [ - 168, - 176, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 5, - }, - "start": Object { - "column": 35, - "line": 5, - }, - }, - "range": Array [ - 170, - 176, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "public", - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 6, - }, - "start": Object { - "column": 35, - "line": 6, - }, - }, - "name": "prop5", - "optional": false, - "range": Array [ - 213, - 218, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 49, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 180, - 227, - ], - "readonly": true, - "static": false, - "type": "TSAbstractPropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 6, - }, - "start": Object { - "column": 40, - "line": 6, - }, - }, - "range": Array [ - 218, - 226, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 6, - }, - "start": Object { - "column": 42, - "line": 6, - }, - }, - "range": Array [ - 220, - 226, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 229, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "AbstractDeclProps", - "optional": false, - "range": Array [ - 15, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 229, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 230, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 32, - ], - "type": "Identifier", - "value": "AbstractDeclProps", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 37, - 44, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 45, - 50, - ], - "type": "Identifier", - "value": "prop1", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 52, - 58, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 62, - 69, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 70, - 78, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 79, - 84, - ], - "type": "Identifier", - "value": "prop2", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 86, - 92, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 32, - "line": 3, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 96, - 103, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 104, - 110, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 111, - 119, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 120, - 125, - ], - "type": "Identifier", - "value": "prop3", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 31, - "line": 4, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 4, - }, - "start": Object { - "column": 33, - "line": 4, - }, - }, - "range": Array [ - 127, - 133, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 39, - "line": 4, - }, - }, - "range": Array [ - 133, - 134, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 137, - 144, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 145, - 153, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 154, - 162, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 5, - }, - "start": Object { - "column": 28, - "line": 5, - }, - }, - "range": Array [ - 163, - 168, - ], - "type": "Identifier", - "value": "prop4", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 5, - }, - "start": Object { - "column": 33, - "line": 5, - }, - }, - "range": Array [ - 168, - 169, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 5, - }, - "start": Object { - "column": 35, - "line": 5, - }, - }, - "range": Array [ - 170, - 176, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 5, - }, - "start": Object { - "column": 41, - "line": 5, - }, - }, - "range": Array [ - 176, - 177, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 180, - 187, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 188, - 194, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 195, - 203, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 6, - }, - "start": Object { - "column": 26, - "line": 6, - }, - }, - "range": Array [ - 204, - 212, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 6, - }, - "start": Object { - "column": 35, - "line": 6, - }, - }, - "range": Array [ - 213, - 218, - ], - "type": "Identifier", - "value": "prop5", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 6, - }, - "start": Object { - "column": 40, - "line": 6, - }, - }, - "range": Array [ - 218, - 219, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 6, - }, - "start": Object { - "column": 42, - "line": 6, - }, - }, - "range": Array [ - 220, - 226, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 6, - }, - "start": Object { - "column": 48, - "line": 6, - }, - }, - "range": Array [ - 226, - 227, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 228, - 229, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-optional-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-optional-method.src.ts.shot deleted file mode 100644 index 2bc82c310bb8..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-optional-method.src.ts.shot +++ /dev/null @@ -1,562 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics abstract-class-with-optional-method.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "abstract": true, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "createSocket", - "optional": false, - "range": Array [ - 43, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 43, - 76, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 56, - 76, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 58, - 75, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 60, - 75, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "name": "Promise", - "optional": false, - "range": Array [ - 60, - 67, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 68, - 74, - ], - "type": "TSStringKeyword", - }, - ], - "range": Array [ - 67, - 75, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 78, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "AbstractSocket", - "optional": false, - "range": Array [ - 22, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 78, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 78, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 78, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 36, - ], - "type": "Identifier", - "value": "AbstractSocket", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 43, - 55, - ], - "type": "Identifier", - "value": "createSocket", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 60, - 67, - ], - "type": "Identifier", - "value": "Promise", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 68, - 74, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-method.src.ts.shot deleted file mode 100644 index 2bedfb7ac5ff..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-method.src.ts.shot +++ /dev/null @@ -1,417 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics abstract-class-with-override-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": true, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "name": "show", - "optional": false, - "range": Array [ - 80, - 84, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": true, - "range": Array [ - 62, - 87, - ], - "static": false, - "type": "TSAbstractMethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 84, - 87, - ], - "returnType": undefined, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "range": Array [ - 58, - 89, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "SpecializedComponent", - "optional": false, - "range": Array [ - 15, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 89, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 57, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "name": "SomeComponent", - "optional": false, - "range": Array [ - 44, - 57, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 90, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 35, - ], - "type": "Identifier", - "value": "SpecializedComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 43, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 57, - ], - "type": "Identifier", - "value": "SomeComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 1, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 62, - 70, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 71, - 79, - ], - "type": "Identifier", - "value": "override", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 80, - 84, - ], - "type": "Identifier", - "value": "show", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot deleted file mode 100644 index 1b092c20049c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot +++ /dev/null @@ -1,394 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics abstract-class-with-override-property.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": true, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 80, - 83, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": true, - "range": Array [ - 62, - 88, - ], - "readonly": false, - "static": false, - "type": "TSAbstractPropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "range": Array [ - 58, - 90, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "SpecializedComponent", - "optional": false, - "range": Array [ - 15, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 90, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 57, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "name": "SomeComponent", - "optional": false, - "range": Array [ - 44, - 57, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 91, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 35, - ], - "type": "Identifier", - "value": "SpecializedComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 43, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 57, - ], - "type": "Identifier", - "value": "SomeComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 1, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 62, - 70, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 71, - 79, - ], - "type": "Identifier", - "value": "override", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 80, - 83, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 87, - 88, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-interface.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-interface.src.ts.shot deleted file mode 100644 index ead501da9618..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-interface.src.ts.shot +++ /dev/null @@ -1,215 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics abstract-interface.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "I", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 31, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - "exportKind": "type", - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 25, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "I", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/angle-bracket-type-assertion-arrow-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/angle-bracket-type-assertion-arrow-function.src.ts.shot deleted file mode 100644 index 8d450898f1bf..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/angle-bracket-type-assertion-arrow-function.src.ts.shot +++ /dev/null @@ -1,548 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics angle-bracket-type-assertion-arrow-function.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "asserted2", - "optional": false, - "range": Array [ - 4, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "name": "n", - "optional": false, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 40, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 42, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "n", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 22, - 42, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 43, - ], - "type": "TSTypeAssertion", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "TSAnyKeyword", - }, - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 43, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 13, - ], - "type": "Identifier", - "value": "asserted2", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "n", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "value": "n", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/angle-bracket-type-assertion.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/angle-bracket-type-assertion.src.ts.shot deleted file mode 100644 index 1629da85325a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/angle-bracket-type-assertion.src.ts.shot +++ /dev/null @@ -1,284 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics angle-bracket-type-assertion.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 27, - ], - "type": "TSTypeAssertion", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "TSAnyKeyword", - }, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 27, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/arrow-function-with-optional-parameter.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/arrow-function-with-optional-parameter.src.ts.shot deleted file mode 100644 index e13f20e84529..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/arrow-function-with-optional-parameter.src.ts.shot +++ /dev/null @@ -1,403 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics arrow-function-with-optional-parameter.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "async": false, - "body": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "k", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "operator": "+", - "range": Array [ - 9, - 14, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "BinaryExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "k", - "optional": true, - "range": Array [ - 2, - 4, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 1, - 14, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 17, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "k", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "k", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/arrow-function-with-type-parameters.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/arrow-function-with-type-parameters.src.ts.shot deleted file mode 100644 index d184debdce52..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/arrow-function-with-type-parameters.src.ts.shot +++ /dev/null @@ -1,606 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics arrow-function-with-type-parameters.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 31, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 33, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 4, - 8, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 0, - 33, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "type": "ArrowFunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 1, - 2, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 0, - 3, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/async-function-expression.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/async-function-expression.src.ts.shot deleted file mode 100644 index 028c4f3ca9e3..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/async-function-expression.src.ts.shot +++ /dev/null @@ -1,344 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics async-function-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "async": true, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 16, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 1, - 26, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 29, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 6, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 20, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/async-function-with-var-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/async-function-with-var-declaration.src.ts.shot deleted file mode 100644 index ad8b2ec9dee0..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/async-function-with-var-declaration.src.ts.shot +++ /dev/null @@ -1,724 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics async-function-with-var-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "async": true, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 38, - 43, - ], - "raw": "'foo'", - "type": "Literal", - "value": "foo", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 32, - 43, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 28, - 44, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 53, - 56, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 59, - 64, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 53, - 64, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 49, - 65, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "name": "fooBar", - "optional": false, - "range": Array [ - 76, - 82, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 85, - 93, - ], - "raw": "'fooBar'", - "type": "Literal", - "value": "fooBar", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 76, - 93, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 70, - 94, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 96, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 96, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 97, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 38, - 43, - ], - "type": "String", - "value": "'foo'", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 49, - 52, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 53, - 56, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 59, - 64, - ], - "type": "String", - "value": "'bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 70, - 75, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 76, - 82, - ], - "type": "Identifier", - "value": "fooBar", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 85, - 93, - ], - "type": "String", - "value": "'fooBar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 93, - 94, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/await-without-async-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/await-without-async-function.src.ts.shot deleted file mode 100644 index 72c8450e1e12..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/await-without-async-function.src.ts.shot +++ /dev/null @@ -1,629 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics await-without-async-function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "argument": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 37, - 40, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 37, - 42, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 31, - 42, - ], - "type": "AwaitExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 25, - 42, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 19, - 43, - ], - "type": "VariableDeclaration", - }, - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 53, - 56, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": "qux", - "optional": false, - "range": Array [ - 57, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 53, - 60, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 46, - 61, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 63, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 63, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 64, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 31, - 36, - ], - "type": "Identifier", - "value": "await", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 37, - 40, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 53, - 56, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 57, - 60, - ], - "type": "Identifier", - "value": "qux", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/call-signatures-with-generics.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/call-signatures-with-generics.src.ts.shot deleted file mode 100644 index 9f15fc121592..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/call-signatures-with-generics.src.ts.shot +++ /dev/null @@ -1,890 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics call-signatures-with-generics.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 67, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "members": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 19, - 28, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 20, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 15, - 37, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 29, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSCallSignatureDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 16, - 17, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 15, - 18, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 47, - 56, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 48, - 56, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 50, - 56, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 40, - 65, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 57, - 65, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 59, - 65, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSConstructSignatureDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 44, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 44, - 45, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 43, - 46, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "range": Array [ - 11, - 67, - ], - "type": "TSTypeLiteral", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 68, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 40, - 43, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 50, - 56, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 59, - 65, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/call-signatures.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/call-signatures.src.ts.shot deleted file mode 100644 index 5d82d07709b5..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/call-signatures.src.ts.shot +++ /dev/null @@ -1,662 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics call-signatures.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 61, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "members": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 16, - 25, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 15, - 34, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 26, - 34, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSCallSignatureDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 41, - 50, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 42, - 50, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 37, - 59, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 51, - 59, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSConstructSignatureDeclaration", - "typeParameters": undefined, - }, - ], - "range": Array [ - 11, - 61, - ], - "type": "TSTypeLiteral", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 62, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 37, - 40, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-expression.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-expression.src.ts.shot deleted file mode 100644 index 831a51bb9587..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-expression.src.ts.shot +++ /dev/null @@ -1,247 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics cast-as-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "<", - "range": Array [ - 0, - 5, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "TSAsExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 16, - ], - "type": "TSBooleanKeyword", - }, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 16, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-multi-assign.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-multi-assign.src.ts.shot deleted file mode 100644 index 239d6837284e..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-multi-assign.src.ts.shot +++ /dev/null @@ -1,351 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics cast-as-multi-assign.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "expression": Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 12, - ], - "type": "TSAsExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 12, - ], - "type": "TSNumberKeyword", - }, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 19, - ], - "type": "TSAsExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "TSAnyKeyword", - }, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 25, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 5, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 12, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-multi.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-multi.src.ts.shot deleted file mode 100644 index 073977b60c66..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-multi.src.ts.shot +++ /dev/null @@ -1,264 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics cast-as-multi.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "TSAsExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "TSAnyKeyword", - }, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "TSAsExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 4, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-operator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-operator.src.ts.shot deleted file mode 100644 index a6ad519b22ab..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-operator.src.ts.shot +++ /dev/null @@ -1,245 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics cast-as-operator.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "===", - "range": Array [ - 0, - 17, - ], - "right": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 17, - ], - "type": "TSAsExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 5, - ], - "type": "Punctuator", - "value": "===", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 10, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-simple.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-simple.src.ts.shot deleted file mode 100644 index 999ba3023f58..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/cast-as-simple.src.ts.shot +++ /dev/null @@ -1,268 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics cast-as-simple.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 20, - ], - "type": "TSAsExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "TSAnyKeyword", - }, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 20, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/catch-clause-with-annotation.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/catch-clause-with-annotation.src.ts.shot deleted file mode 100644 index 271f190c206b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/catch-clause-with-annotation.src.ts.shot +++ /dev/null @@ -1,673 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics catch-clause-with-annotation.src 1`] = ` -Object { - "body": Array [ - Object { - "block": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 8, - ], - "type": "BlockStatement", - }, - "finalizer": null, - "handler": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 24, - 28, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "param": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 17, - 22, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "TSAnyKeyword", - }, - }, - }, - "range": Array [ - 9, - 28, - ], - "type": "CatchClause", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "TryStatement", - }, - Object { - "block": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 34, - 38, - ], - "type": "BlockStatement", - }, - "finalizer": null, - "handler": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 11, - }, - "start": Object { - "column": 21, - "line": 9, - }, - }, - "range": Array [ - 58, - 62, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 11, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "param": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 9, - "line": 9, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 46, - 56, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 10, - "line": 9, - }, - }, - "range": Array [ - 47, - 56, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "range": Array [ - 49, - 56, - ], - "type": "TSUnknownKeyword", - }, - }, - }, - "range": Array [ - 39, - 62, - ], - "type": "CatchClause", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 11, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 30, - 62, - ], - "type": "TryStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 63, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "try", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Keyword", - "value": "catch", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "Keyword", - "value": "try", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 39, - 44, - ], - "type": "Keyword", - "value": "catch", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 9, - "line": 9, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 9, - }, - "start": Object { - "column": 10, - "line": 9, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "range": Array [ - 49, - 56, - ], - "type": "Identifier", - "value": "unknown", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 9, - }, - "start": Object { - "column": 21, - "line": 9, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 11, - }, - "start": Object { - "column": 0, - "line": 11, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/catch-clause-with-invalid-annotation.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/catch-clause-with-invalid-annotation.src.ts.shot deleted file mode 100644 index 873e5d58ec45..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/catch-clause-with-invalid-annotation.src.ts.shot +++ /dev/null @@ -1,350 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics catch-clause-with-invalid-annotation.src 1`] = ` -Object { - "body": Array [ - Object { - "block": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 8, - ], - "type": "BlockStatement", - }, - "finalizer": null, - "handler": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "param": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 16, - 25, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 9, - 31, - ], - "type": "CatchClause", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "TryStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "try", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Keyword", - "value": "catch", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-multi-line-keyword-abstract.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-multi-line-keyword-abstract.src.ts.shot deleted file mode 100644 index 92999b2ef5bc..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-multi-line-keyword-abstract.src.ts.shot +++ /dev/null @@ -1,219 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-multi-line-keyword-abstract.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "abstract", - "optional": false, - "range": Array [ - 0, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "ExpressionStatement", - }, - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 9, - 19, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-multi-line-keyword-declare.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-multi-line-keyword-declare.src.ts.shot deleted file mode 100644 index e7044c2559d0..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-multi-line-keyword-declare.src.ts.shot +++ /dev/null @@ -1,219 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-multi-line-keyword-declare.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "declare", - "optional": false, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "ExpressionStatement", - }, - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 18, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 13, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts.shot deleted file mode 100644 index 9dff921bdb21..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts.shot +++ /dev/null @@ -1,616 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-private-identifier-field-with-accessibility-error.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": "private", - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "priv1", - "range": Array [ - 22, - 28, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 36, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "public", - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "priv2", - "range": Array [ - 46, - 52, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 39, - 60, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 52, - 60, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 54, - 60, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "priv3", - "range": Array [ - 70, - 76, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 63, - 84, - ], - "readonly": false, - "static": true, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 76, - 84, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 78, - 84, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 86, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 86, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 87, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "#priv1", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "Identifier", - "value": "#priv2", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 54, - 60, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 63, - 69, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 70, - 76, - ], - "type": "Identifier", - "value": "#priv3", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 78, - 84, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-annotation.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-annotation.src.ts.shot deleted file mode 100644 index 07b5c0884e10..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-annotation.src.ts.shot +++ /dev/null @@ -1,916 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-private-identifier-field-with-annotation.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "priv1", - "range": Array [ - 14, - 20, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 29, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSNumberKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "priv2", - "range": Array [ - 32, - 38, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 32, - 51, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 38, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "TSNumberKeyword", - }, - }, - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 55, - 66, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 55, - 95, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 75, - 79, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "priv1", - "range": Array [ - 80, - 86, - ], - "type": "PrivateIdentifier", - }, - "range": Array [ - 75, - 86, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "operator": "=", - "range": Array [ - 75, - 90, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 89, - 90, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 75, - 91, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 69, - 95, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "params": Array [], - "range": Array [ - 66, - 95, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 97, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 97, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 98, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "value": "#priv1", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "#priv2", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 55, - 66, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 75, - 79, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 80, - 86, - ], - "type": "Identifier", - "value": "#priv1", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 87, - 88, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-readonly-field.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-readonly-field.src.ts.shot deleted file mode 100644 index 11091507b801..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-readonly-field.src.ts.shot +++ /dev/null @@ -1,314 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-private-identifier-readonly-field.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "priv", - "range": Array [ - 23, - 28, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 36, - ], - "readonly": true, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 38, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 22, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 23, - 28, - ], - "type": "Identifier", - "value": "#priv", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot deleted file mode 100644 index e0feb16115b8..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot +++ /dev/null @@ -1,727 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-static-blocks.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "count", - "optional": false, - "range": Array [ - 21, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 31, - ], - "readonly": false, - "static": true, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - }, - Object { - "body": Array [ - Object { - "alternate": null, - "consequent": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "name": "count", - "optional": false, - "range": Array [ - 76, - 81, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "operator": "++", - "prefix": false, - "range": Array [ - 76, - 83, - ], - "type": "UpdateExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 76, - 84, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 68, - 90, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 47, - 90, - ], - "test": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "name": "someCondition", - "optional": false, - "range": Array [ - 51, - 64, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "optional": false, - "range": Array [ - 51, - 66, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "type": "IfStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 34, - 94, - ], - "type": "StaticBlock", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 96, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 96, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 97, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 21, - 26, - ], - "type": "Identifier", - "value": "count", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 47, - 49, - ], - "type": "Keyword", - "value": "if", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 51, - 64, - ], - "type": "Identifier", - "value": "someCondition", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 22, - "line": 4, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 76, - 81, - ], - "type": "Identifier", - "value": "count", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 81, - 83, - ], - "type": "Punctuator", - "value": "++", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 93, - 94, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot deleted file mode 100644 index 66b705fe68d9..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot +++ /dev/null @@ -1,1416 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-accessibility-modifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": "private", - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 35, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 34, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "public", - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 38, - 65, - ], - "readonly": false, - "static": true, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 56, - 64, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "TSNumberKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "public", - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "getBar", - "optional": false, - "range": Array [ - 75, - 81, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 68, - 111, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 98, - 102, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 103, - 106, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 98, - 106, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 91, - 107, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 85, - 111, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "params": Array [], - "range": Array [ - 82, - 111, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": "protected", - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "name": "setBar", - "optional": false, - "range": Array [ - 124, - 130, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 114, - 171, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 152, - 156, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 157, - 160, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 152, - 160, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "operator": "=", - "range": Array [ - 152, - 166, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 163, - 166, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 152, - 167, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 34, - "line": 7, - }, - }, - "range": Array [ - 146, - 171, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 7, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 132, - 144, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 24, - "line": 7, - }, - }, - "range": Array [ - 136, - 144, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 26, - "line": 7, - }, - }, - "range": Array [ - 138, - 144, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 131, - 171, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 173, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 173, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 11, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 174, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 45, - 51, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 68, - 74, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 75, - 81, - ], - "type": "Identifier", - "value": "getBar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 91, - 97, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 98, - 102, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 103, - 106, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 114, - 123, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 124, - 130, - ], - "type": "Identifier", - "value": "setBar", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 19, - "line": 7, - }, - }, - "range": Array [ - 131, - 132, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "range": Array [ - 132, - 135, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 7, - }, - "start": Object { - "column": 24, - "line": 7, - }, - }, - "range": Array [ - 136, - 137, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 26, - "line": 7, - }, - }, - "range": Array [ - 138, - 144, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 7, - }, - "start": Object { - "column": 32, - "line": 7, - }, - }, - "range": Array [ - 144, - 145, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 7, - }, - "start": Object { - "column": 34, - "line": 7, - }, - }, - "range": Array [ - 146, - 147, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 152, - 156, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 156, - 157, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "range": Array [ - 157, - 160, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 13, - "line": 8, - }, - }, - "range": Array [ - 161, - 162, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "range": Array [ - 163, - 166, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 8, - }, - "start": Object { - "column": 18, - "line": 8, - }, - }, - "range": Array [ - 166, - 167, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 170, - 171, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 10, - }, - }, - "range": Array [ - 172, - 173, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-modifier.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-modifier.src.ts.shot deleted file mode 100644 index 5a6a52818cba..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-modifier.src.ts.shot +++ /dev/null @@ -1,591 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-constructor-and-modifier.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": "protected", - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 22, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 12, - 39, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 36, - 39, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 33, - 39, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": "public", - "computed": true, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 51, - 64, - ], - "raw": "'constructor'", - "type": "Literal", - "value": "constructor", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 43, - 71, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 68, - 71, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "params": Array [], - "range": Array [ - 65, - 71, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 73, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 73, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 74, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 21, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 33, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 43, - 49, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 51, - 64, - ], - "type": "String", - "value": "'constructor'", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 29, - "line": 4, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts.shot deleted file mode 100644 index 894bb53449df..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts.shot +++ /dev/null @@ -1,584 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-constructor-and-parameter-property-with-modifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 53, - 64, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 53, - 110, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 57, - "line": 2, - }, - }, - "range": Array [ - 108, - 110, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [ - Object { - "accessibility": "protected", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 55, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "override": true, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 55, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "name": "param", - "optional": false, - "range": Array [ - 93, - 106, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 2, - }, - "start": Object { - "column": 47, - "line": 2, - }, - }, - "range": Array [ - 98, - 106, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 2, - }, - "start": Object { - "column": 49, - "line": 2, - }, - }, - "range": Array [ - 100, - 106, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 65, - 106, - ], - "readonly": true, - "static": false, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 64, - 110, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 112, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "SpecializedComponent", - "optional": false, - "range": Array [ - 6, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 112, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "SomeComponent", - "optional": false, - "range": Array [ - 35, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 113, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 26, - ], - "type": "Identifier", - "value": "SpecializedComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 34, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 48, - ], - "type": "Identifier", - "value": "SomeComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 53, - 64, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 65, - 74, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 75, - 83, - ], - "type": "Identifier", - "value": "override", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 84, - 92, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 93, - 98, - ], - "type": "Identifier", - "value": "param", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 47, - "line": 2, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 2, - }, - "start": Object { - "column": 49, - "line": 2, - }, - }, - "range": Array [ - 100, - 106, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 2, - }, - "start": Object { - "column": 55, - "line": 2, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 2, - }, - "start": Object { - "column": 57, - "line": 2, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 58, - "line": 2, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts.shot deleted file mode 100644 index 34b890b13c39..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts.shot +++ /dev/null @@ -1,676 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-constructor-and-parameter-proptery-with-override-modifier.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 53, - 64, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 53, - 109, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 97, - 102, - ], - "type": "Super", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 97, - 104, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 97, - 105, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 89, - 109, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [ - Object { - "accessibility": undefined, - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "override": true, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "param", - "optional": false, - "range": Array [ - 74, - 87, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 79, - 87, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 81, - 87, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 65, - 87, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 64, - 109, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 111, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "SpecializedComponent", - "optional": false, - "range": Array [ - 6, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 111, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "SomeComponent", - "optional": false, - "range": Array [ - 35, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 112, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 26, - ], - "type": "Identifier", - "value": "SpecializedComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 34, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 48, - ], - "type": "Identifier", - "value": "SomeComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 53, - 64, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 65, - 73, - ], - "type": "Identifier", - "value": "override", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 74, - 79, - ], - "type": "Identifier", - "value": "param", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 81, - 87, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 87, - 88, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 97, - 102, - ], - "type": "Keyword", - "value": "super", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 104, - 105, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-return-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-return-type.src.ts.shot deleted file mode 100644 index 601f1dcb7db5..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-return-type.src.ts.shot +++ /dev/null @@ -1,693 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-constructor-and-return-type.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 12, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 12, - 37, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 23, - 37, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 33, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 42, - 55, - ], - "raw": "'constructor'", - "type": "Literal", - "value": "constructor", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 41, - 70, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 67, - 70, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "params": Array [], - "range": Array [ - 56, - 70, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 58, - 66, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "range": Array [ - 60, - 66, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 72, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 72, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 73, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 23, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 42, - 55, - ], - "type": "String", - "value": "'constructor'", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "range": Array [ - 60, - 66, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 30, - "line": 4, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-type-parameters.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-type-parameters.src.ts.shot deleted file mode 100644 index f9fdbbc32f7a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-type-parameters.src.ts.shot +++ /dev/null @@ -1,783 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-constructor-and-type-parameters.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 12, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 12, - 32, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 23, - 32, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 24, - 25, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 23, - 26, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 37, - 50, - ], - "raw": "'constructor'", - "type": "Literal", - "value": "constructor", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 36, - 60, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 57, - 60, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "params": Array [], - "range": Array [ - 51, - 60, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 52, - 53, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 51, - 54, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 62, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 62, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 63, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 23, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 37, - 50, - ], - "type": "String", - "value": "'constructor'", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 4, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot deleted file mode 100644 index 195cc59be388..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot +++ /dev/null @@ -1,1547 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-declare-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "prop1", - "optional": false, - "range": Array [ - 28, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 20, - 42, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 33, - 41, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "public", - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "name": "prop2", - "optional": false, - "range": Array [ - 60, - 65, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 45, - 74, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 65, - 73, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 67, - 73, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "name": "prop3", - "optional": false, - "range": Array [ - 92, - 97, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 77, - 106, - ], - "readonly": false, - "static": true, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 22, - "line": 4, - }, - }, - "range": Array [ - 97, - 105, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 99, - 105, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "name": "prop3", - "optional": false, - "range": Array [ - 126, - 131, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 109, - 140, - ], - "readonly": true, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 5, - }, - "start": Object { - "column": 24, - "line": 5, - }, - }, - "range": Array [ - 131, - 139, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 5, - }, - "start": Object { - "column": 26, - "line": 5, - }, - }, - "range": Array [ - 133, - 139, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "public", - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 6, - }, - "start": Object { - "column": 26, - "line": 6, - }, - }, - "name": "prop4", - "optional": false, - "range": Array [ - 167, - 172, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 143, - 181, - ], - "readonly": true, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 6, - }, - "start": Object { - "column": 31, - "line": 6, - }, - }, - "range": Array [ - 172, - 180, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 6, - }, - "start": Object { - "column": 33, - "line": 6, - }, - }, - "range": Array [ - 174, - 180, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "public", - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 7, - }, - "start": Object { - "column": 24, - "line": 7, - }, - }, - "name": "prop5", - "optional": false, - "range": Array [ - 206, - 211, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 184, - 220, - ], - "readonly": false, - "static": true, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 7, - }, - "start": Object { - "column": 29, - "line": 7, - }, - }, - "range": Array [ - 211, - 219, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 7, - }, - "start": Object { - "column": 31, - "line": 7, - }, - }, - "range": Array [ - 213, - 219, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "public", - "computed": false, - "declare": true, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 8, - }, - "start": Object { - "column": 33, - "line": 8, - }, - }, - "name": "prop6", - "optional": false, - "range": Array [ - 254, - 259, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 47, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 223, - 268, - ], - "readonly": true, - "static": true, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 8, - }, - "start": Object { - "column": 38, - "line": 8, - }, - }, - "range": Array [ - 259, - 267, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 8, - }, - "start": Object { - "column": 40, - "line": 8, - }, - }, - "range": Array [ - 261, - 267, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 270, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "DeclProps", - "optional": false, - "range": Array [ - 6, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 270, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 271, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 15, - ], - "type": "Identifier", - "value": "DeclProps", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 27, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 28, - 33, - ], - "type": "Identifier", - "value": "prop1", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 45, - 52, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 60, - 65, - ], - "type": "Identifier", - "value": "prop2", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 67, - 73, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 77, - 84, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 85, - 91, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 92, - 97, - ], - "type": "Identifier", - "value": "prop3", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 22, - "line": 4, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 99, - 105, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 30, - "line": 4, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 109, - 116, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 117, - 125, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 126, - 131, - ], - "type": "Identifier", - "value": "prop3", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 24, - "line": 5, - }, - }, - "range": Array [ - 131, - 132, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 5, - }, - "start": Object { - "column": 26, - "line": 5, - }, - }, - "range": Array [ - 133, - 139, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 5, - }, - "start": Object { - "column": 32, - "line": 5, - }, - }, - "range": Array [ - 139, - 140, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 143, - 150, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 151, - 157, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 158, - 166, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 6, - }, - "start": Object { - "column": 26, - "line": 6, - }, - }, - "range": Array [ - 167, - 172, - ], - "type": "Identifier", - "value": "prop4", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 6, - }, - "start": Object { - "column": 31, - "line": 6, - }, - }, - "range": Array [ - 172, - 173, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 6, - }, - "start": Object { - "column": 33, - "line": 6, - }, - }, - "range": Array [ - 174, - 180, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 6, - }, - "start": Object { - "column": 39, - "line": 6, - }, - }, - "range": Array [ - 180, - 181, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 184, - 191, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 192, - 198, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 199, - 205, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 7, - }, - "start": Object { - "column": 24, - "line": 7, - }, - }, - "range": Array [ - 206, - 211, - ], - "type": "Identifier", - "value": "prop5", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 7, - }, - "start": Object { - "column": 29, - "line": 7, - }, - }, - "range": Array [ - 211, - 212, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 7, - }, - "start": Object { - "column": 31, - "line": 7, - }, - }, - "range": Array [ - 213, - 219, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 7, - }, - "start": Object { - "column": 37, - "line": 7, - }, - }, - "range": Array [ - 219, - 220, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 223, - 230, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "range": Array [ - 231, - 237, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 17, - "line": 8, - }, - }, - "range": Array [ - 238, - 244, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 8, - }, - "start": Object { - "column": 24, - "line": 8, - }, - }, - "range": Array [ - 245, - 253, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 8, - }, - "start": Object { - "column": 33, - "line": 8, - }, - }, - "range": Array [ - 254, - 259, - ], - "type": "Identifier", - "value": "prop6", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 8, - }, - "start": Object { - "column": 38, - "line": 8, - }, - }, - "range": Array [ - 259, - 260, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 8, - }, - "start": Object { - "column": 40, - "line": 8, - }, - }, - "range": Array [ - 261, - 267, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 8, - }, - "start": Object { - "column": 46, - "line": 8, - }, - }, - "range": Array [ - 267, - 268, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 269, - 270, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot deleted file mode 100644 index e767114ee28a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot +++ /dev/null @@ -1,335 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-definite-assignment.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": true, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 12, - 23, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 22, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 25, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot deleted file mode 100644 index fd77a07d3f48..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot +++ /dev/null @@ -1,492 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-export-parameter-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 16, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 16, - 54, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 54, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "accessibility": undefined, - "decorators": Array [], - "export": true, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 35, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 28, - 44, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 27, - 54, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 56, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 56, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 58, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 16, - 27, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-and-implements.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-and-implements.src.ts.shot deleted file mode 100644 index 77813357b3fa..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-and-implements.src.ts.shot +++ /dev/null @@ -1,294 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-extends-and-implements.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 78, - "line": 1, - }, - }, - "range": Array [ - 78, - 80, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "ClassWithParentAndInterface", - "optional": false, - "range": Array [ - 6, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 66, - "line": 1, - }, - }, - "name": "MyInterface", - "optional": false, - "range": Array [ - 66, - 77, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 66, - "line": 1, - }, - }, - "range": Array [ - 66, - 77, - ], - "type": "TSClassImplements", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 80, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "name": "MyOtherClass", - "optional": false, - "range": Array [ - 42, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 81, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 33, - ], - "type": "Identifier", - "value": "ClassWithParentAndInterface", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 54, - ], - "type": "Identifier", - "value": "MyOtherClass", - }, - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 1, - }, - "start": Object { - "column": 55, - "line": 1, - }, - }, - "range": Array [ - 55, - 65, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 66, - "line": 1, - }, - }, - "range": Array [ - 66, - 77, - ], - "type": "Identifier", - "value": "MyInterface", - }, - Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 1, - }, - "start": Object { - "column": 78, - "line": 1, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 79, - "line": 1, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-generic-multiple.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-generic-multiple.src.ts.shot deleted file mode 100644 index f6f2652718e2..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-generic-multiple.src.ts.shot +++ /dev/null @@ -1,592 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-extends-generic-multiple.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 45, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "name": "D", - "optional": false, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 34, - 40, - ], - "type": "TSTypeParameterInstantiation", - }, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 10, - 21, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 9, - 22, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 46, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 19, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 30, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "value": "D", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-generic.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-generic.src.ts.shot deleted file mode 100644 index e569978121f7..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-extends-generic.src.ts.shot +++ /dev/null @@ -1,443 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-extends-generic.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 32, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": 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, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 24, - 27, - ], - "type": "TSTypeParameterInstantiation", - }, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 10, - 11, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 9, - 12, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 20, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method-default.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method-default.src.ts.shot deleted file mode 100644 index 8e4836a5eadc..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method-default.src.ts.shot +++ /dev/null @@ -1,530 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-generic-method-default.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "getBar", - "optional": false, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 34, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 32, - 34, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 20, - 34, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "in": false, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 21, - 28, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 20, - 29, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 36, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "value": "getBar", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method.src.ts.shot deleted file mode 100644 index c79899448ef1..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method.src.ts.shot +++ /dev/null @@ -1,456 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-generic-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "getBar", - "optional": false, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 28, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 20, - 28, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 20, - 23, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 30, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "value": "getBar", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-and-extends.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-and-extends.src.ts.shot deleted file mode 100644 index 8e00330e79ba..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-and-extends.src.ts.shot +++ /dev/null @@ -1,294 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-implements-and-extends.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 78, - "line": 1, - }, - }, - "range": Array [ - 78, - 80, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "ClassWithParentAndInterface", - "optional": false, - "range": Array [ - 6, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "name": "MyInterface", - "optional": false, - "range": Array [ - 45, - 56, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 56, - ], - "type": "TSClassImplements", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 80, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 65, - "line": 1, - }, - }, - "name": "MyOtherClass", - "optional": false, - "range": Array [ - 65, - 77, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 81, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 33, - ], - "type": "Identifier", - "value": "ClassWithParentAndInterface", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 44, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 56, - ], - "type": "Identifier", - "value": "MyInterface", - }, - Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 64, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 65, - "line": 1, - }, - }, - "range": Array [ - 65, - 77, - ], - "type": "Identifier", - "value": "MyOtherClass", - }, - Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 1, - }, - "start": Object { - "column": 78, - "line": 1, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 79, - "line": 1, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-generic-multiple.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-generic-multiple.src.ts.shot deleted file mode 100644 index ad5f6cb5f24a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-generic-multiple.src.ts.shot +++ /dev/null @@ -1,424 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-implements-generic-multiple.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 35, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 30, - ], - "type": "TSClassImplements", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 30, - "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, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "S", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 24, - 30, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 20, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "S", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-generic.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-generic.src.ts.shot deleted file mode 100644 index 1309c2bd42ed..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements-generic.src.ts.shot +++ /dev/null @@ -1,349 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-implements-generic.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 32, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 27, - ], - "type": "TSClassImplements", - "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, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "S", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 24, - 27, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 20, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "S", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements.src.ts.shot deleted file mode 100644 index 4168e15a30f2..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-implements.src.ts.shot +++ /dev/null @@ -1,238 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-implements.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 29, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "TSClassImplements", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 20, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-method.src.ts.shot deleted file mode 100644 index 2948805166cb..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-method.src.ts.shot +++ /dev/null @@ -1,883 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 12, - 29, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 15, - 29, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 32, - 44, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 41, - 44, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 35, - 44, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 36, - 37, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 35, - 38, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 47, - 55, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 53, - 55, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "params": Array [], - "range": Array [ - 50, - 55, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 57, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 57, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 58, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-mixin-reference.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-mixin-reference.src.ts.shot deleted file mode 100644 index ffd5aa93d96c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-mixin-reference.src.ts.shot +++ /dev/null @@ -1,628 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-mixin-reference.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 49, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "M", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "name": "Base", - "optional": false, - "range": Array [ - 37, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 43, - 44, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 0, - 49, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 35, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Constructor", - "optional": false, - "range": Array [ - 21, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "name": "M", - "optional": false, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 32, - 35, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 11, - 35, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 10, - 36, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "M", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 20, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 32, - ], - "type": "Identifier", - "value": "Constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "value": "M", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 41, - ], - "type": "Identifier", - "value": "Base", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-mixin.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-mixin.src.ts.shot deleted file mode 100644 index 131bd49f8deb..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-mixin.src.ts.shot +++ /dev/null @@ -1,2125 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-mixin.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 79, - 82, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": null, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 60, - 82, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "Base", - "optional": false, - "range": Array [ - 74, - 78, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": undefined, - "type": "ClassExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 53, - 82, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 84, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "M", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "name": "Base", - "optional": false, - "range": Array [ - 38, - 45, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 44, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 0, - 84, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 36, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Constructor", - "optional": false, - "range": Array [ - 21, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 33, - 35, - ], - "type": "TSTypeLiteral", - }, - ], - "range": Array [ - 32, - 36, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 11, - 36, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 10, - 37, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 5, - }, - "start": Object { - "column": 39, - "line": 5, - }, - }, - "range": Array [ - 125, - 128, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 92, - 93, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "name": "I", - "optional": false, - "range": Array [ - 123, - 124, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "range": Array [ - 123, - 124, - ], - "type": "TSClassImplements", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 42, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 86, - 128, - ], - "superClass": Object { - "arguments": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 23, - "line": 5, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 109, - 110, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "name": "M", - "optional": false, - "range": Array [ - 102, - 103, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "optional": false, - "range": Array [ - 102, - 111, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 104, - 107, - ], - "type": "TSAnyKeyword", - }, - ], - "range": Array [ - 103, - 108, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 138, - 141, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 136, - 137, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 130, - 141, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 12, - "line": 8, - }, - }, - "range": Array [ - 154, - 157, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "name": "I", - "optional": false, - "range": Array [ - 152, - 153, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 142, - 157, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "name": "Constructor", - "optional": false, - "range": Array [ - 163, - 174, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 48, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 158, - 206, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "abstract": false, - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 22, - "line": 9, - }, - }, - "params": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 9, - }, - "start": Object { - "column": 30, - "line": 9, - }, - }, - "name": "args", - "optional": false, - "range": Array [ - 188, - 192, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 27, - "line": 9, - }, - }, - "optional": false, - "range": Array [ - 185, - 199, - ], - "type": "RestElement", - "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", - }, - }, - "value": undefined, - }, - ], - "range": Array [ - 180, - 205, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 43, - "line": 9, - }, - }, - "range": Array [ - 201, - 205, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 46, - "line": 9, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 46, - "line": 9, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 204, - 205, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "type": "TSConstructorType", - "typeParameters": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 16, - "line": 9, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 175, - 176, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 175, - 176, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 174, - 177, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 207, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "M", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 20, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 32, - ], - "type": "Identifier", - "value": "Constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 42, - ], - "type": "Identifier", - "value": "Base", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 60, - 65, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 66, - 73, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 74, - 78, - ], - "type": "Identifier", - "value": "Base", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 86, - 91, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 94, - 101, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Identifier", - "value": "M", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 104, - 107, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 23, - "line": 5, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 24, - "line": 5, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 26, - "line": 5, - }, - }, - "range": Array [ - 112, - 122, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "range": Array [ - 123, - 124, - ], - "type": "Identifier", - "value": "I", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 5, - }, - "start": Object { - "column": 39, - "line": 5, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 5, - }, - "start": Object { - "column": 41, - "line": 5, - }, - }, - "range": Array [ - 127, - 128, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 130, - 135, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 136, - 137, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 138, - 139, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 140, - 141, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 142, - 151, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "range": Array [ - 152, - 153, - ], - "type": "Identifier", - "value": "I", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 8, - }, - "start": Object { - "column": 12, - "line": 8, - }, - }, - "range": Array [ - 154, - 155, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 14, - "line": 8, - }, - }, - "range": Array [ - 156, - 157, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 158, - 162, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "range": Array [ - 163, - 174, - ], - "type": "Identifier", - "value": "Constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 9, - }, - "start": Object { - "column": 16, - "line": 9, - }, - }, - "range": Array [ - 174, - 175, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "range": Array [ - 175, - 176, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 18, - "line": 9, - }, - }, - "range": Array [ - 176, - 177, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 9, - }, - "start": Object { - "column": 20, - "line": 9, - }, - }, - "range": Array [ - 178, - 179, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 9, - }, - "start": Object { - "column": 22, - "line": 9, - }, - }, - "range": Array [ - 180, - 183, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 9, - }, - "start": Object { - "column": 26, - "line": 9, - }, - }, - "range": Array [ - 184, - 185, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 9, - }, - "start": Object { - "column": 27, - "line": 9, - }, - }, - "range": Array [ - 185, - 188, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 9, - }, - "start": Object { - "column": 30, - "line": 9, - }, - }, - "range": Array [ - 188, - 192, - ], - "type": "Identifier", - "value": "args", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 9, - }, - "start": Object { - "column": 34, - "line": 9, - }, - }, - "range": Array [ - 192, - 193, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 9, - }, - "start": Object { - "column": 36, - "line": 9, - }, - }, - "range": Array [ - 194, - 197, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 9, - }, - "start": Object { - "column": 39, - "line": 9, - }, - }, - "range": Array [ - 197, - 198, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 40, - "line": 9, - }, - }, - "range": Array [ - 198, - 199, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 9, - }, - "start": Object { - "column": 41, - "line": 9, - }, - }, - "range": Array [ - 199, - 200, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 43, - "line": 9, - }, - }, - "range": Array [ - 201, - 203, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 46, - "line": 9, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 9, - }, - "start": Object { - "column": 47, - "line": 9, - }, - }, - "range": Array [ - 205, - 206, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-method.src.ts.shot deleted file mode 100644 index 6841a4cb34fc..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-method.src.ts.shot +++ /dev/null @@ -1,3185 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-optional-computed-method.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "computed1", - "optional": false, - "range": Array [ - 6, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 24, - ], - "raw": "\\"buzz\\"", - "type": "Literal", - "value": "buzz", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 24, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "computed2", - "optional": false, - "range": Array [ - 32, - 41, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 44, - 50, - ], - "raw": "\\"bazz\\"", - "type": "Literal", - "value": "bazz", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 32, - 50, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 26, - 51, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 58, - 61, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "name": "member", - "optional": false, - "range": Array [ - 68, - 74, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 68, - 84, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 76, - 84, - ], - "raw": "\\"member\\"", - "type": "Literal", - "value": "member", - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "member2", - "optional": false, - "range": Array [ - 88, - 95, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 88, - 106, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 97, - 106, - ], - "raw": "\\"member2\\"", - "type": "Literal", - "value": "member2", - }, - }, - ], - "range": Array [ - 64, - 109, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 58, - 109, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 52, - 110, - ], - "type": "VariableDeclaration", - }, - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 3, - "line": 8, - }, - }, - "name": "computed1", - "optional": false, - "range": Array [ - 124, - 133, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 17, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 123, - 138, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 17, - "line": 8, - }, - "start": Object { - "column": 14, - "line": 8, - }, - }, - "params": Array [], - "range": Array [ - 135, - 138, - ], - "returnType": undefined, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 3, - "line": 9, - }, - }, - "name": "computed2", - "optional": false, - "range": Array [ - 142, - 151, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 141, - 158, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "range": Array [ - 156, - 158, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 14, - "line": 9, - }, - }, - "params": Array [], - "range": Array [ - 153, - 158, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 10, - }, - "start": Object { - "column": 3, - "line": 10, - }, - }, - "range": Array [ - 163, - 164, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 162, - 169, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 6, - "line": 10, - }, - }, - "params": Array [], - "range": Array [ - 166, - 169, - ], - "returnType": undefined, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 11, - }, - "start": Object { - "column": 3, - "line": 11, - }, - }, - "range": Array [ - 173, - 174, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 11, - "line": 11, - }, - "start": Object { - "column": 2, - "line": 11, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 172, - 181, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 11, - }, - "start": Object { - "column": 9, - "line": 11, - }, - }, - "range": Array [ - 179, - 181, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 11, - }, - "start": Object { - "column": 6, - "line": 11, - }, - }, - "params": Array [], - "range": Array [ - 176, - 181, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 3, - "line": 12, - }, - }, - "range": Array [ - 186, - 196, - ], - "raw": "\\"literal1\\"", - "type": "Literal", - "value": "literal1", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 18, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 185, - 201, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 18, - "line": 12, - }, - "start": Object { - "column": 15, - "line": 12, - }, - }, - "params": Array [], - "range": Array [ - 198, - 201, - ], - "returnType": undefined, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 13, - }, - "start": Object { - "column": 3, - "line": 13, - }, - }, - "range": Array [ - 205, - 215, - ], - "raw": "\\"literal2\\"", - "type": "Literal", - "value": "literal2", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 20, - "line": 13, - }, - "start": Object { - "column": 2, - "line": 13, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 204, - 222, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 13, - }, - "start": Object { - "column": 18, - "line": 13, - }, - }, - "range": Array [ - 220, - 222, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 13, - }, - "start": Object { - "column": 15, - "line": 13, - }, - }, - "params": Array [], - "range": Array [ - 217, - 222, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 13, - "line": 14, - }, - "start": Object { - "column": 3, - "line": 14, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 14, - }, - "start": Object { - "column": 3, - "line": 14, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 227, - 230, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 14, - }, - "start": Object { - "column": 7, - "line": 14, - }, - }, - "name": "member", - "optional": false, - "range": Array [ - 231, - 237, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 227, - 237, - ], - "type": "MemberExpression", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 20, - "line": 14, - }, - "start": Object { - "column": 2, - "line": 14, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 226, - 244, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 14, - }, - "start": Object { - "column": 18, - "line": 14, - }, - }, - "range": Array [ - 242, - 244, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 14, - }, - "start": Object { - "column": 15, - "line": 14, - }, - }, - "params": Array [], - "range": Array [ - 239, - 244, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 14, - "line": 15, - }, - "start": Object { - "column": 3, - "line": 15, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 15, - }, - "start": Object { - "column": 3, - "line": 15, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 249, - 252, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 15, - }, - "start": Object { - "column": 7, - "line": 15, - }, - }, - "name": "member2", - "optional": false, - "range": Array [ - 253, - 260, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 249, - 260, - ], - "type": "MemberExpression", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 19, - "line": 15, - }, - "start": Object { - "column": 2, - "line": 15, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 248, - 265, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 19, - "line": 15, - }, - "start": Object { - "column": 16, - "line": 15, - }, - }, - "params": Array [], - "range": Array [ - 262, - 265, - ], - "returnType": undefined, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 16, - }, - "start": Object { - "column": 3, - "line": 16, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 269, - 270, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 16, - }, - "start": Object { - "column": 3, - "line": 16, - }, - }, - "optional": false, - "range": Array [ - 269, - 272, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 13, - "line": 16, - }, - "start": Object { - "column": 2, - "line": 16, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 268, - 279, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 16, - }, - "start": Object { - "column": 11, - "line": 16, - }, - }, - "range": Array [ - 277, - 279, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 13, - "line": 16, - }, - "start": Object { - "column": 8, - "line": 16, - }, - }, - "params": Array [], - "range": Array [ - 274, - 279, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 17, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 119, - 281, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 117, - 118, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 17, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 111, - 281, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 18, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 282, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 15, - ], - "type": "Identifier", - "value": "computed1", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "String", - "value": "\\"buzz\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 26, - 31, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 32, - 41, - ], - "type": "Identifier", - "value": "computed2", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "String", - "value": "\\"bazz\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 52, - 57, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 58, - 61, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 68, - 74, - ], - "type": "Identifier", - "value": "member", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 76, - 84, - ], - "type": "String", - "value": "\\"member\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 88, - 95, - ], - "type": "Identifier", - "value": "member2", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 97, - 106, - ], - "type": "String", - "value": "\\"member2\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 111, - 116, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 119, - 120, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 123, - 124, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 3, - "line": 8, - }, - }, - "range": Array [ - 124, - 133, - ], - "type": "Identifier", - "value": "computed1", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 8, - }, - "start": Object { - "column": 12, - "line": 8, - }, - }, - "range": Array [ - 133, - 134, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 13, - "line": 8, - }, - }, - "range": Array [ - 134, - 135, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 14, - "line": 8, - }, - }, - "range": Array [ - 135, - 136, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "range": Array [ - 136, - 137, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 8, - }, - "start": Object { - "column": 16, - "line": 8, - }, - }, - "range": Array [ - 137, - 138, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 141, - 142, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 3, - "line": 9, - }, - }, - "range": Array [ - 142, - 151, - ], - "type": "Identifier", - "value": "computed2", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "range": Array [ - 151, - 152, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 9, - }, - "start": Object { - "column": 13, - "line": 9, - }, - }, - "range": Array [ - 152, - 153, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 9, - }, - "start": Object { - "column": 14, - "line": 9, - }, - }, - "range": Array [ - 153, - 154, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 15, - "line": 9, - }, - }, - "range": Array [ - 154, - 155, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "range": Array [ - 156, - 157, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 18, - "line": 9, - }, - }, - "range": Array [ - 157, - 158, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "range": Array [ - 158, - 159, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 162, - 163, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 10, - }, - "start": Object { - "column": 3, - "line": 10, - }, - }, - "range": Array [ - 163, - 164, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "range": Array [ - 164, - 165, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 10, - }, - "start": Object { - "column": 5, - "line": 10, - }, - }, - "range": Array [ - 165, - 166, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 10, - }, - "start": Object { - "column": 6, - "line": 10, - }, - }, - "range": Array [ - 166, - 167, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 10, - }, - "start": Object { - "column": 7, - "line": 10, - }, - }, - "range": Array [ - 167, - 168, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "range": Array [ - 168, - 169, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 11, - }, - "start": Object { - "column": 2, - "line": 11, - }, - }, - "range": Array [ - 172, - 173, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 11, - }, - "start": Object { - "column": 3, - "line": 11, - }, - }, - "range": Array [ - 173, - 174, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "range": Array [ - 174, - 175, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 11, - }, - "start": Object { - "column": 5, - "line": 11, - }, - }, - "range": Array [ - 175, - 176, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 11, - }, - "start": Object { - "column": 6, - "line": 11, - }, - }, - "range": Array [ - 176, - 177, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 11, - }, - "start": Object { - "column": 7, - "line": 11, - }, - }, - "range": Array [ - 177, - 178, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 11, - }, - "start": Object { - "column": 9, - "line": 11, - }, - }, - "range": Array [ - 179, - 180, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 11, - }, - "start": Object { - "column": 10, - "line": 11, - }, - }, - "range": Array [ - 180, - 181, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 11, - }, - "start": Object { - "column": 11, - "line": 11, - }, - }, - "range": Array [ - 181, - 182, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "range": Array [ - 185, - 186, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 3, - "line": 12, - }, - }, - "range": Array [ - 186, - 196, - ], - "type": "String", - "value": "\\"literal1\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 12, - }, - "start": Object { - "column": 13, - "line": 12, - }, - }, - "range": Array [ - 196, - 197, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 12, - }, - "start": Object { - "column": 14, - "line": 12, - }, - }, - "range": Array [ - 197, - 198, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 12, - }, - "start": Object { - "column": 15, - "line": 12, - }, - }, - "range": Array [ - 198, - 199, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 12, - }, - "start": Object { - "column": 16, - "line": 12, - }, - }, - "range": Array [ - 199, - 200, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 12, - }, - "start": Object { - "column": 17, - "line": 12, - }, - }, - "range": Array [ - 200, - 201, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 13, - }, - "start": Object { - "column": 2, - "line": 13, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 13, - }, - "start": Object { - "column": 3, - "line": 13, - }, - }, - "range": Array [ - 205, - 215, - ], - "type": "String", - "value": "\\"literal2\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 13, - }, - "start": Object { - "column": 13, - "line": 13, - }, - }, - "range": Array [ - 215, - 216, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 13, - }, - "start": Object { - "column": 14, - "line": 13, - }, - }, - "range": Array [ - 216, - 217, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 13, - }, - "start": Object { - "column": 15, - "line": 13, - }, - }, - "range": Array [ - 217, - 218, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 13, - }, - "start": Object { - "column": 16, - "line": 13, - }, - }, - "range": Array [ - 218, - 219, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 13, - }, - "start": Object { - "column": 18, - "line": 13, - }, - }, - "range": Array [ - 220, - 221, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 13, - }, - "start": Object { - "column": 19, - "line": 13, - }, - }, - "range": Array [ - 221, - 222, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 13, - }, - "start": Object { - "column": 20, - "line": 13, - }, - }, - "range": Array [ - 222, - 223, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 14, - }, - "start": Object { - "column": 2, - "line": 14, - }, - }, - "range": Array [ - 226, - 227, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 14, - }, - "start": Object { - "column": 3, - "line": 14, - }, - }, - "range": Array [ - 227, - 230, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 14, - }, - "start": Object { - "column": 6, - "line": 14, - }, - }, - "range": Array [ - 230, - 231, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 14, - }, - "start": Object { - "column": 7, - "line": 14, - }, - }, - "range": Array [ - 231, - 237, - ], - "type": "Identifier", - "value": "member", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 14, - }, - "start": Object { - "column": 13, - "line": 14, - }, - }, - "range": Array [ - 237, - 238, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 14, - }, - "start": Object { - "column": 14, - "line": 14, - }, - }, - "range": Array [ - 238, - 239, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 14, - }, - "start": Object { - "column": 15, - "line": 14, - }, - }, - "range": Array [ - 239, - 240, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 14, - }, - "start": Object { - "column": 16, - "line": 14, - }, - }, - "range": Array [ - 240, - 241, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 14, - }, - "start": Object { - "column": 18, - "line": 14, - }, - }, - "range": Array [ - 242, - 243, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 14, - }, - "start": Object { - "column": 19, - "line": 14, - }, - }, - "range": Array [ - 243, - 244, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 14, - }, - "start": Object { - "column": 20, - "line": 14, - }, - }, - "range": Array [ - 244, - 245, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 15, - }, - "start": Object { - "column": 2, - "line": 15, - }, - }, - "range": Array [ - 248, - 249, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 15, - }, - "start": Object { - "column": 3, - "line": 15, - }, - }, - "range": Array [ - 249, - 252, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 15, - }, - "start": Object { - "column": 6, - "line": 15, - }, - }, - "range": Array [ - 252, - 253, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 15, - }, - "start": Object { - "column": 7, - "line": 15, - }, - }, - "range": Array [ - 253, - 260, - ], - "type": "Identifier", - "value": "member2", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 15, - }, - "start": Object { - "column": 14, - "line": 15, - }, - }, - "range": Array [ - 260, - 261, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 15, - }, - "start": Object { - "column": 15, - "line": 15, - }, - }, - "range": Array [ - 261, - 262, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 15, - }, - "start": Object { - "column": 16, - "line": 15, - }, - }, - "range": Array [ - 262, - 263, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 15, - }, - "start": Object { - "column": 17, - "line": 15, - }, - }, - "range": Array [ - 263, - 264, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 15, - }, - "start": Object { - "column": 18, - "line": 15, - }, - }, - "range": Array [ - 264, - 265, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 16, - }, - "start": Object { - "column": 2, - "line": 16, - }, - }, - "range": Array [ - 268, - 269, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 16, - }, - "start": Object { - "column": 3, - "line": 16, - }, - }, - "range": Array [ - 269, - 270, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 16, - }, - "start": Object { - "column": 4, - "line": 16, - }, - }, - "range": Array [ - 270, - 271, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 16, - }, - "start": Object { - "column": 5, - "line": 16, - }, - }, - "range": Array [ - 271, - 272, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 16, - }, - "start": Object { - "column": 6, - "line": 16, - }, - }, - "range": Array [ - 272, - 273, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 16, - }, - "start": Object { - "column": 7, - "line": 16, - }, - }, - "range": Array [ - 273, - 274, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 16, - }, - "start": Object { - "column": 8, - "line": 16, - }, - }, - "range": Array [ - 274, - 275, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 16, - }, - "start": Object { - "column": 9, - "line": 16, - }, - }, - "range": Array [ - 275, - 276, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 16, - }, - "start": Object { - "column": 11, - "line": 16, - }, - }, - "range": Array [ - 277, - 278, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 16, - }, - "start": Object { - "column": 12, - "line": 16, - }, - }, - "range": Array [ - 278, - 279, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 17, - }, - "start": Object { - "column": 0, - "line": 17, - }, - }, - "range": Array [ - 280, - 281, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot deleted file mode 100644 index 4fece8014ebf..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot +++ /dev/null @@ -1,374 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-optional-computed-property.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": "private", - "computed": true, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 28, - ], - "raw": "'foo'", - "type": "Literal", - "value": "foo", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 14, - 43, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "undefined", - "optional": false, - "range": Array [ - 33, - 42, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 45, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 46, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 28, - ], - "type": "String", - "value": "'foo'", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 33, - 42, - ], - "type": "Identifier", - "value": "undefined", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-methods.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-methods.src.ts.shot deleted file mode 100644 index 1b5fc09b085b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-methods.src.ts.shot +++ /dev/null @@ -1,805 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-optional-methods.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 14, - 21, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 18, - 21, - ], - "returnType": undefined, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 24, - 39, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 28, - 39, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 30, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": "private", - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 50, - 53, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 42, - 65, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "params": Array [], - "range": Array [ - 54, - 65, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 56, - 64, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 67, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 67, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 68, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 42, - 49, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 50, - 53, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot deleted file mode 100644 index 8c685b95703d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot +++ /dev/null @@ -1,1999 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-optional-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "computed", - "optional": false, - "range": Array [ - 6, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 23, - ], - "raw": "'buzz'", - "type": "Literal", - "value": "buzz", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 23, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "computed2", - "optional": false, - "range": Array [ - 31, - 40, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 43, - 49, - ], - "raw": "'bazz'", - "type": "Literal", - "value": "bazz", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 31, - 49, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 25, - 50, - ], - "type": "VariableDeclaration", - }, - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 65, - 68, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 65, - 70, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 73, - 87, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 78, - 86, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 80, - 86, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "private", - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 98, - 101, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 90, - 112, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 15, - "line": 6, - }, - }, - "range": Array [ - 103, - 111, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 105, - 111, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": true, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "name": "computed", - "optional": false, - "range": Array [ - 116, - 124, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 115, - 127, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": true, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 3, - "line": 8, - }, - }, - "range": Array [ - 131, - 140, - ], - "raw": "'literal'", - "type": "Literal", - "value": "literal", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 130, - 143, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": true, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 9, - }, - "start": Object { - "column": 3, - "line": 9, - }, - }, - "range": Array [ - 147, - 148, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 146, - 151, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": true, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 10, - }, - "start": Object { - "column": 3, - "line": 10, - }, - }, - "name": "computed2", - "optional": false, - "range": Array [ - 155, - 164, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 154, - 175, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 10, - }, - "start": Object { - "column": 14, - "line": 10, - }, - }, - "range": Array [ - 166, - 174, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 10, - }, - "start": Object { - "column": 16, - "line": 10, - }, - }, - "range": Array [ - 168, - 174, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": true, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 11, - }, - "start": Object { - "column": 3, - "line": 11, - }, - }, - "range": Array [ - 179, - 189, - ], - "raw": "'literal2'", - "type": "Literal", - "value": "literal2", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 11, - }, - "start": Object { - "column": 2, - "line": 11, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 178, - 200, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 11, - }, - "start": Object { - "column": 15, - "line": 11, - }, - }, - "range": Array [ - 191, - 199, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 11, - }, - "start": Object { - "column": 17, - "line": 11, - }, - }, - "range": Array [ - 193, - 199, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": true, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 12, - }, - "start": Object { - "column": 3, - "line": 12, - }, - }, - "range": Array [ - 204, - 205, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 203, - 216, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 12, - }, - "start": Object { - "column": 6, - "line": 12, - }, - }, - "range": Array [ - 207, - 215, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "range": Array [ - 209, - 215, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 61, - 218, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 57, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 51, - 218, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 14, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 219, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "Identifier", - "value": "computed", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 23, - ], - "type": "String", - "value": "'buzz'", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 25, - 30, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 31, - 40, - ], - "type": "Identifier", - "value": "computed2", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 43, - 49, - ], - "type": "String", - "value": "'bazz'", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 51, - 56, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 57, - 60, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 65, - 68, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 80, - 86, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 90, - 97, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 98, - 101, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 101, - 102, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 15, - "line": 6, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 105, - 111, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 115, - 116, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 116, - 124, - ], - "type": "Identifier", - "value": "computed", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 7, - }, - }, - "range": Array [ - 126, - 127, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 130, - 131, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 3, - "line": 8, - }, - }, - "range": Array [ - 131, - 140, - ], - "type": "String", - "value": "'literal'", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 8, - }, - "start": Object { - "column": 12, - "line": 8, - }, - }, - "range": Array [ - 140, - 141, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 13, - "line": 8, - }, - }, - "range": Array [ - 141, - 142, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 14, - "line": 8, - }, - }, - "range": Array [ - 142, - 143, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 146, - 147, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 9, - }, - "start": Object { - "column": 3, - "line": 9, - }, - }, - "range": Array [ - 147, - 148, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 148, - 149, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "range": Array [ - 149, - 150, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 9, - }, - }, - "range": Array [ - 150, - 151, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 154, - 155, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 10, - }, - "start": Object { - "column": 3, - "line": 10, - }, - }, - "range": Array [ - 155, - 164, - ], - "type": "Identifier", - "value": "computed2", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 10, - }, - "start": Object { - "column": 12, - "line": 10, - }, - }, - "range": Array [ - 164, - 165, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 10, - }, - "start": Object { - "column": 13, - "line": 10, - }, - }, - "range": Array [ - 165, - 166, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 14, - "line": 10, - }, - }, - "range": Array [ - 166, - 167, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 10, - }, - "start": Object { - "column": 16, - "line": 10, - }, - }, - "range": Array [ - 168, - 174, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 10, - }, - "start": Object { - "column": 22, - "line": 10, - }, - }, - "range": Array [ - 174, - 175, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 11, - }, - "start": Object { - "column": 2, - "line": 11, - }, - }, - "range": Array [ - 178, - 179, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 11, - }, - "start": Object { - "column": 3, - "line": 11, - }, - }, - "range": Array [ - 179, - 189, - ], - "type": "String", - "value": "'literal2'", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 11, - }, - "start": Object { - "column": 13, - "line": 11, - }, - }, - "range": Array [ - 189, - 190, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 11, - }, - "start": Object { - "column": 14, - "line": 11, - }, - }, - "range": Array [ - 190, - 191, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 11, - }, - "start": Object { - "column": 15, - "line": 11, - }, - }, - "range": Array [ - 191, - 192, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 11, - }, - "start": Object { - "column": 17, - "line": 11, - }, - }, - "range": Array [ - 193, - 199, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 11, - }, - "start": Object { - "column": 23, - "line": 11, - }, - }, - "range": Array [ - 199, - 200, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "range": Array [ - 203, - 204, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 12, - }, - "start": Object { - "column": 3, - "line": 12, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 12, - }, - "start": Object { - "column": 4, - "line": 12, - }, - }, - "range": Array [ - 205, - 206, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 12, - }, - "start": Object { - "column": 5, - "line": 12, - }, - }, - "range": Array [ - 206, - 207, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 12, - }, - "start": Object { - "column": 6, - "line": 12, - }, - }, - "range": Array [ - 207, - 208, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "range": Array [ - 209, - 215, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 12, - }, - "start": Object { - "column": 14, - "line": 12, - }, - }, - "range": Array [ - 215, - 216, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 13, - }, - }, - "range": Array [ - 217, - 218, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot deleted file mode 100644 index 531dcdad739f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot +++ /dev/null @@ -1,340 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-optional-property-undefined.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": "private", - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 12, - 37, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "undefined", - "optional": false, - "range": Array [ - 27, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 39, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 19, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 36, - ], - "type": "Identifier", - "value": "undefined", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-method.src.ts.shot deleted file mode 100644 index b33f6f436418..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-method.src.ts.shot +++ /dev/null @@ -1,435 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-override-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "show", - "optional": false, - "range": Array [ - 62, - 66, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": true, - "range": Array [ - 53, - 87, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 69, - 87, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 66, - 87, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 89, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "SpecializedComponent", - "optional": false, - "range": Array [ - 6, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 89, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "SomeComponent", - "optional": false, - "range": Array [ - 35, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 77, - 83, - ], - "type": "Line", - "value": " ...", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 90, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 26, - ], - "type": "Identifier", - "value": "SpecializedComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 34, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 48, - ], - "type": "Identifier", - "value": "SomeComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 53, - 61, - ], - "type": "Identifier", - "value": "override", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 62, - 66, - ], - "type": "Identifier", - "value": "show", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot deleted file mode 100644 index 5fc0b57cf812..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot +++ /dev/null @@ -1,376 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-override-property.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 62, - 65, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": true, - "range": Array [ - 53, - 70, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 68, - 69, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 72, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "SpecializedComponent", - "optional": false, - "range": Array [ - 6, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 72, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "SomeComponent", - "optional": false, - "range": Array [ - 35, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 73, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 26, - ], - "type": "Identifier", - "value": "SpecializedComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 34, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 48, - ], - "type": "Identifier", - "value": "SomeComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 53, - 61, - ], - "type": "Identifier", - "value": "override", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 62, - 65, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-optional-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-optional-property.src.ts.shot deleted file mode 100644 index 2ce169080677..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-optional-property.src.ts.shot +++ /dev/null @@ -1,709 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-private-optional-property.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "prop", - "range": Array [ - 14, - 19, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 14, - 29, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "propExplicitWithValue", - "range": Array [ - 32, - 54, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 32, - 69, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "range": Array [ - 55, - 63, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "range": Array [ - 57, - 63, - ], - "type": "TSStringKeyword", - }, - }, - "value": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 66, - 68, - ], - "raw": "''", - "type": "Literal", - "value": "", - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "name": "propImplicitWithValue", - "range": Array [ - 72, - 94, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 72, - 101, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 98, - 100, - ], - "raw": "''", - "type": "Literal", - "value": "", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 103, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 103, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 104, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "type": "Identifier", - "value": "#prop", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 32, - 54, - ], - "type": "Identifier", - "value": "#propExplicitWithValue", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "range": Array [ - 57, - 63, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 3, - }, - "start": Object { - "column": 34, - "line": 3, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 66, - 68, - ], - "type": "String", - "value": "''", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 72, - 94, - ], - "type": "Identifier", - "value": "#propImplicitWithValue", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 98, - 100, - ], - "type": "String", - "value": "''", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 30, - "line": 4, - }, - }, - "range": Array [ - 100, - 101, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot deleted file mode 100644 index c85ed787d6db..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot +++ /dev/null @@ -1,1179 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-private-parameter-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 201, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 57, - "line": 5, - }, - }, - "range": Array [ - 199, - 201, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [ - Object { - "accessibility": "private", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "firstName", - "optional": false, - "range": Array [ - 34, - 51, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 43, - 51, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 45, - 51, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 26, - 51, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "private", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "name": "lastName", - "optional": false, - "range": Array [ - 84, - 100, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 3, - }, - }, - "range": Array [ - 92, - 100, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 3, - }, - }, - "range": Array [ - 94, - 100, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 67, - 100, - ], - "readonly": true, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "private", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 4, - }, - "start": Object { - "column": 22, - "line": 4, - }, - }, - "name": "age", - "optional": false, - "range": Array [ - 124, - 135, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 4, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 127, - 135, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 129, - 135, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 22, - "line": 4, - }, - }, - "optional": false, - "range": Array [ - 124, - 140, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 36, - "line": 4, - }, - }, - "range": Array [ - 138, - 140, - ], - "raw": "30", - "type": "Literal", - "value": 30, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - "range": Array [ - 116, - 140, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "private", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 47, - "line": 5, - }, - "start": Object { - "column": 31, - "line": 5, - }, - }, - "name": "student", - "optional": false, - "range": Array [ - 173, - 189, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 5, - }, - "start": Object { - "column": 38, - "line": 5, - }, - }, - "range": Array [ - 180, - 189, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 5, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 182, - 189, - ], - "type": "TSBooleanKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 31, - "line": 5, - }, - }, - "optional": false, - "range": Array [ - 173, - 197, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 50, - "line": 5, - }, - }, - "range": Array [ - 192, - 197, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - "range": Array [ - 156, - 197, - ], - "readonly": true, - "static": false, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 25, - 201, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 203, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 203, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 203, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 33, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 34, - 43, - ], - "type": "Identifier", - "value": "firstName", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 45, - 51, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 39, - "line": 2, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 67, - 74, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 75, - 83, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "range": Array [ - 84, - 92, - ], - "type": "Identifier", - "value": "lastName", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 3, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 3, - }, - }, - "range": Array [ - 94, - 100, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 3, - }, - "start": Object { - "column": 47, - "line": 3, - }, - }, - "range": Array [ - 100, - 101, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 116, - 123, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 22, - "line": 4, - }, - }, - "range": Array [ - 124, - 127, - ], - "type": "Identifier", - "value": "age", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 127, - 128, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 129, - 135, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 34, - "line": 4, - }, - }, - "range": Array [ - 136, - 137, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 36, - "line": 4, - }, - }, - "range": Array [ - 138, - 140, - ], - "type": "Numeric", - "value": "30", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 4, - }, - "start": Object { - "column": 38, - "line": 4, - }, - }, - "range": Array [ - 140, - 141, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 156, - 163, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 164, - 172, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 31, - "line": 5, - }, - }, - "range": Array [ - 173, - 180, - ], - "type": "Identifier", - "value": "student", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 5, - }, - "start": Object { - "column": 38, - "line": 5, - }, - }, - "range": Array [ - 180, - 181, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 5, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 182, - 189, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 48, - "line": 5, - }, - }, - "range": Array [ - 190, - 191, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 50, - "line": 5, - }, - }, - "range": Array [ - 192, - 197, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 5, - }, - "start": Object { - "column": 55, - "line": 5, - }, - }, - "range": Array [ - 197, - 198, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 5, - }, - "start": Object { - "column": 57, - "line": 5, - }, - }, - "range": Array [ - 199, - 200, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 58, - "line": 5, - }, - }, - "range": Array [ - 200, - 201, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 202, - 203, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot deleted file mode 100644 index 1e0af20bcff1..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot +++ /dev/null @@ -1,896 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-property-function.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 55, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 17, - 32, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 19, - 32, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 22, - 32, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 32, - ], - "type": "TSBooleanKeyword", - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - }, - "value": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 50, - 54, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 35, - 54, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 37, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 39, - 46, - ], - "type": "TSBooleanKeyword", - }, - }, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 58, - 61, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 58, - 83, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 61, - 69, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 63, - 69, - ], - "type": "TSStringKeyword", - }, - }, - "value": Object { - "async": false, - "body": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 78, - 82, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 72, - 82, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 85, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 85, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 86, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 32, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 39, - 46, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 47, - 49, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 50, - 54, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 58, - 61, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 63, - 69, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 75, - 77, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 78, - 82, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot deleted file mode 100644 index 5c627f37a7fd..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot +++ /dev/null @@ -1,1204 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-property-values.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 20, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 23, - 30, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "properties": Array [], - "range": Array [ - 27, - 29, - ], - "type": "ObjectExpression", - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 33, - 40, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 37, - 39, - ], - "type": "ArrayExpression", - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "d", - "optional": false, - "range": Array [ - 43, - 44, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 43, - 50, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 47, - 49, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 53, - 80, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "arguments": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "properties": Array [], - "range": Array [ - 68, - 70, - ], - "type": "ObjectExpression", - }, - Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 21, - "line": 6, - }, - }, - "range": Array [ - 72, - 74, - ], - "type": "ArrayExpression", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 25, - "line": 6, - }, - }, - "range": Array [ - 76, - 77, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - ], - "loc": Object { - "end": Object { - "column": 27, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 67, - 78, - ], - "type": "ArrayExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "name": "Array", - "optional": false, - "range": Array [ - 61, - 66, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 57, - 79, - ], - "type": "NewExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 82, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 82, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 83, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Identifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 47, - 49, - ], - "type": "String", - "value": "\\"\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 57, - 60, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 61, - 66, - ], - "type": "Identifier", - "value": "Array", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 15, - "line": 6, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 21, - "line": 6, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 22, - "line": 6, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 25, - "line": 6, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 6, - }, - "start": Object { - "column": 26, - "line": 6, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 6, - }, - "start": Object { - "column": 27, - "line": 6, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 6, - }, - "start": Object { - "column": 28, - "line": 6, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot deleted file mode 100644 index 58e981f65164..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot +++ /dev/null @@ -1,1179 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-protected-parameter-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 61, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 209, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 61, - "line": 5, - }, - "start": Object { - "column": 59, - "line": 5, - }, - }, - "range": Array [ - 207, - 209, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 61, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [ - Object { - "accessibility": "protected", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "firstName", - "optional": false, - "range": Array [ - 36, - 53, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 45, - 53, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 47, - 53, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 26, - 53, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "protected", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "name": "lastName", - "optional": false, - "range": Array [ - 88, - 104, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 3, - }, - }, - "range": Array [ - 96, - 104, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 43, - "line": 3, - }, - }, - "range": Array [ - 98, - 104, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 69, - 104, - ], - "readonly": true, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "protected", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "name": "age", - "optional": false, - "range": Array [ - 130, - 141, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 133, - 141, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 29, - "line": 4, - }, - }, - "range": Array [ - 135, - 141, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "optional": false, - "range": Array [ - 130, - 146, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 38, - "line": 4, - }, - }, - "range": Array [ - 144, - 146, - ], - "raw": "30", - "type": "Literal", - "value": 30, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - "range": Array [ - 120, - 146, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "protected", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 33, - "line": 5, - }, - }, - "name": "student", - "optional": false, - "range": Array [ - 181, - 197, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 188, - 197, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 42, - "line": 5, - }, - }, - "range": Array [ - 190, - 197, - ], - "type": "TSBooleanKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 33, - "line": 5, - }, - }, - "optional": false, - "range": Array [ - 181, - 205, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 52, - "line": 5, - }, - }, - "range": Array [ - 200, - 205, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - "range": Array [ - 162, - 205, - ], - "readonly": true, - "static": false, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 25, - 209, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 211, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 211, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 211, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 35, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 45, - ], - "type": "Identifier", - "value": "firstName", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 47, - 53, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 69, - 78, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 79, - 87, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 88, - 96, - ], - "type": "Identifier", - "value": "lastName", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 3, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 43, - "line": 3, - }, - }, - "range": Array [ - 98, - 104, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 3, - }, - "start": Object { - "column": 49, - "line": 3, - }, - }, - "range": Array [ - 104, - 105, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 120, - 129, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 130, - 133, - ], - "type": "Identifier", - "value": "age", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 133, - 134, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 29, - "line": 4, - }, - }, - "range": Array [ - 135, - 141, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 36, - "line": 4, - }, - }, - "range": Array [ - 142, - 143, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 38, - "line": 4, - }, - }, - "range": Array [ - 144, - 146, - ], - "type": "Numeric", - "value": "30", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 4, - }, - "start": Object { - "column": 40, - "line": 4, - }, - }, - "range": Array [ - 146, - 147, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 162, - 171, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 5, - }, - "start": Object { - "column": 24, - "line": 5, - }, - }, - "range": Array [ - 172, - 180, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 5, - }, - "start": Object { - "column": 33, - "line": 5, - }, - }, - "range": Array [ - 181, - 188, - ], - "type": "Identifier", - "value": "student", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 5, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 188, - 189, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 42, - "line": 5, - }, - }, - "range": Array [ - 190, - 197, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 5, - }, - "start": Object { - "column": 50, - "line": 5, - }, - }, - "range": Array [ - 198, - 199, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 52, - "line": 5, - }, - }, - "range": Array [ - 200, - 205, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 5, - }, - "start": Object { - "column": 57, - "line": 5, - }, - }, - "range": Array [ - 205, - 206, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 60, - "line": 5, - }, - "start": Object { - "column": 59, - "line": 5, - }, - }, - "range": Array [ - 207, - 208, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 5, - }, - "start": Object { - "column": 60, - "line": 5, - }, - }, - "range": Array [ - 208, - 209, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 210, - 211, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot deleted file mode 100644 index cdc4474637ff..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot +++ /dev/null @@ -1,1179 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-public-parameter-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 58, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 197, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 58, - "line": 5, - }, - "start": Object { - "column": 56, - "line": 5, - }, - }, - "range": Array [ - 195, - 197, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 58, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [ - Object { - "accessibility": "public", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "name": "firstName", - "optional": false, - "range": Array [ - 33, - 50, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 42, - 50, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 26, - 50, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "public", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "name": "lastName", - "optional": false, - "range": Array [ - 82, - 98, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "range": Array [ - 90, - 98, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 40, - "line": 3, - }, - }, - "range": Array [ - 92, - 98, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 66, - 98, - ], - "readonly": true, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "public", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "name": "age", - "optional": false, - "range": Array [ - 121, - 132, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 124, - 132, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 126, - 132, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "optional": false, - "range": Array [ - 121, - 137, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 4, - }, - }, - "range": Array [ - 135, - 137, - ], - "raw": "30", - "type": "Literal", - "value": 30, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - "range": Array [ - 114, - 137, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "public", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "name": "student", - "optional": false, - "range": Array [ - 169, - 185, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "range": Array [ - 176, - 185, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 39, - "line": 5, - }, - }, - "range": Array [ - 178, - 185, - ], - "type": "TSBooleanKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "optional": false, - "range": Array [ - 169, - 193, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 49, - "line": 5, - }, - }, - "range": Array [ - 188, - 193, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - "range": Array [ - 153, - 193, - ], - "readonly": true, - "static": false, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 25, - 197, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 199, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 199, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 199, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 33, - 42, - ], - "type": "Identifier", - "value": "firstName", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 66, - 72, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 73, - 81, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 82, - 90, - ], - "type": "Identifier", - "value": "lastName", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 40, - "line": 3, - }, - }, - "range": Array [ - 92, - 98, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 46, - "line": 3, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 114, - 120, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "range": Array [ - 121, - 124, - ], - "type": "Identifier", - "value": "age", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 126, - 132, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 4, - }, - "start": Object { - "column": 33, - "line": 4, - }, - }, - "range": Array [ - 133, - 134, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 4, - }, - }, - "range": Array [ - 135, - 137, - ], - "type": "Numeric", - "value": "30", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 37, - "line": 4, - }, - }, - "range": Array [ - 137, - 138, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 153, - 159, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, - }, - }, - "range": Array [ - 160, - 168, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "range": Array [ - 169, - 176, - ], - "type": "Identifier", - "value": "student", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "range": Array [ - 176, - 177, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 39, - "line": 5, - }, - }, - "range": Array [ - 178, - 185, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 5, - }, - "start": Object { - "column": 47, - "line": 5, - }, - }, - "range": Array [ - 186, - 187, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 49, - "line": 5, - }, - }, - "range": Array [ - 188, - 193, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 54, - "line": 5, - }, - }, - "range": Array [ - 193, - 194, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 56, - "line": 5, - }, - }, - "range": Array [ - 195, - 196, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 5, - }, - "start": Object { - "column": 57, - "line": 5, - }, - }, - "range": Array [ - 196, - 197, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 198, - 199, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot deleted file mode 100644 index af0bb502f9af..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot +++ /dev/null @@ -1,734 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-readonly-parameter-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 53, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 107, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 53, - "line": 3, - }, - "start": Object { - "column": 51, - "line": 3, - }, - }, - "range": Array [ - 105, - 107, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 53, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [ - Object { - "accessibility": undefined, - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "firstName", - "optional": false, - "range": Array [ - 35, - 52, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 52, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 26, - 52, - ], - "readonly": true, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": undefined, - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "name": "lastName", - "optional": false, - "range": Array [ - 77, - 93, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "range": Array [ - 85, - 93, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 87, - 93, - ], - "type": "TSStringKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 77, - 103, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 42, - "line": 3, - }, - }, - "range": Array [ - 96, - 103, - ], - "raw": "'Smith'", - "type": "Literal", - "value": "Smith", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - "range": Array [ - 68, - 103, - ], - "readonly": true, - "static": false, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 25, - 107, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 109, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 109, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 109, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 34, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 35, - 44, - ], - "type": "Identifier", - "value": "firstName", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 68, - 76, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 77, - 85, - ], - "type": "Identifier", - "value": "lastName", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 87, - 93, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 40, - "line": 3, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 42, - "line": 3, - }, - }, - "range": Array [ - 96, - 103, - ], - "type": "String", - "value": "'Smith'", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 3, - }, - "start": Object { - "column": 49, - "line": 3, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 3, - }, - "start": Object { - "column": 51, - "line": 3, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 3, - }, - "start": Object { - "column": 52, - "line": 3, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot deleted file mode 100644 index e1cb3027f482..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot +++ /dev/null @@ -1,338 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-readonly-property.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": "public", - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 16, - 47, - ], - "readonly": true, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 46, - ], - "raw": "'string'", - "type": "Literal", - "value": "string", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 49, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 23, - 31, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 46, - ], - "type": "String", - "value": "'string'", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot deleted file mode 100644 index 3967ac7a6c03..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot +++ /dev/null @@ -1,492 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-static-parameter-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 16, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 16, - 54, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 54, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "accessibility": undefined, - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 35, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 28, - 44, - ], - "readonly": false, - "static": true, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 27, - 54, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 56, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 56, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 59, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 16, - 27, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-two-methods-computed-constructor.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-two-methods-computed-constructor.src.ts.shot deleted file mode 100644 index b98697aa054e..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-two-methods-computed-constructor.src.ts.shot +++ /dev/null @@ -1,954 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-two-methods-computed-constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 25, - ], - "raw": "\\"constructor\\"", - "type": "Literal", - "value": "constructor", - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 12, - 44, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 39, - 44, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 25, - 44, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 26, - 27, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 25, - 28, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "decorators": Array [], - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 49, - 62, - ], - "raw": "\\"constructor\\"", - "type": "Literal", - "value": "constructor", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 48, - 82, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 31, - "line": 5, - }, - }, - "range": Array [ - 77, - 82, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "params": Array [], - "range": Array [ - 63, - 82, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 68, - 76, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 5, - }, - "start": Object { - "column": 24, - "line": 5, - }, - }, - "range": Array [ - 70, - 76, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 64, - 65, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 64, - 65, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 63, - 66, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 84, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 84, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "EmptyStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 86, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 25, - ], - "type": "String", - "value": "\\"constructor\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 49, - 62, - ], - "type": "String", - "value": "\\"constructor\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 5, - }, - "start": Object { - "column": 24, - "line": 5, - }, - }, - "range": Array [ - 70, - 76, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 5, - }, - "start": Object { - "column": 31, - "line": 5, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter-default.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter-default.src.ts.shot deleted file mode 100644 index 579cd3a2533b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter-default.src.ts.shot +++ /dev/null @@ -1,350 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-type-parameter-default.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 23, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "in": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 10, - 17, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 9, - 18, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter-underscore.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter-underscore.src.ts.shot deleted file mode 100644 index ee2092ed3b5c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter-underscore.src.ts.shot +++ /dev/null @@ -1,276 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-type-parameter-underscore.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "__P", - "optional": false, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 8, - 11, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 7, - 12, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "__P", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter.src.ts.shot deleted file mode 100644 index d59966b5d8d9..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-type-parameter.src.ts.shot +++ /dev/null @@ -1,276 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics class-with-type-parameter.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 10, - 11, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 9, - 12, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/const-assertions.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/const-assertions.src.ts.shot deleted file mode 100644 index d4d46d09c25d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/const-assertions.src.ts.shot +++ /dev/null @@ -1,2244 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics const-assertions.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 21, - 23, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 21, - 32, - ], - "type": "TSAsExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 27, - 32, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "const", - "optional": false, - "range": Array [ - 27, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 32, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 13, - 33, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 67, - 68, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expression": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 72, - 74, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 76, - 78, - ], - "raw": "20", - "type": "Literal", - "value": 20, - }, - ], - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 71, - 79, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 71, - 88, - ], - "type": "TSAsExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "range": Array [ - 83, - 88, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "name": "const", - "optional": false, - "range": Array [ - 83, - 88, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 67, - 88, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 26, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 63, - 89, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 132, - 133, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "name": "text", - "optional": false, - "range": Array [ - 138, - 142, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 138, - 151, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 16, - "line": 8, - }, - }, - "range": Array [ - 144, - 151, - ], - "raw": "\\"hello\\"", - "type": "Literal", - "value": "hello", - }, - }, - ], - "range": Array [ - 136, - 153, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 136, - 162, - ], - "type": "TSAsExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 8, - }, - "start": Object { - "column": 29, - "line": 8, - }, - }, - "range": Array [ - 157, - 162, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 8, - }, - "start": Object { - "column": 29, - "line": 8, - }, - }, - "name": "const", - "optional": false, - "range": Array [ - 157, - 162, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 132, - 162, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 35, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 128, - 163, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 182, - 183, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 11, - }, - "start": Object { - "column": 15, - "line": 11, - }, - }, - "range": Array [ - 193, - 195, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 11, - }, - "start": Object { - "column": 8, - "line": 11, - }, - }, - "range": Array [ - 186, - 195, - ], - "type": "TSTypeAssertion", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 11, - }, - "start": Object { - "column": 9, - "line": 11, - }, - }, - "range": Array [ - 187, - 192, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 11, - }, - "start": Object { - "column": 9, - "line": 11, - }, - }, - "name": "const", - "optional": false, - "range": Array [ - 187, - 192, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "range": Array [ - 182, - 195, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 18, - "line": 11, - }, - "start": Object { - "column": 0, - "line": 11, - }, - }, - "range": Array [ - 178, - 196, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 14, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 230, - 231, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expression": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 14, - }, - "start": Object { - "column": 16, - "line": 14, - }, - }, - "range": Array [ - 242, - 244, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 14, - }, - "start": Object { - "column": 20, - "line": 14, - }, - }, - "range": Array [ - 246, - 248, - ], - "raw": "20", - "type": "Literal", - "value": 20, - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 14, - }, - "start": Object { - "column": 15, - "line": 14, - }, - }, - "range": Array [ - 241, - 249, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 14, - }, - "start": Object { - "column": 8, - "line": 14, - }, - }, - "range": Array [ - 234, - 249, - ], - "type": "TSTypeAssertion", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 14, - }, - "start": Object { - "column": 9, - "line": 14, - }, - }, - "range": Array [ - 235, - 240, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 14, - }, - "start": Object { - "column": 9, - "line": 14, - }, - }, - "name": "const", - "optional": false, - "range": Array [ - 235, - 240, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 14, - }, - }, - "range": Array [ - 230, - 249, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 24, - "line": 14, - }, - "start": Object { - "column": 0, - "line": 14, - }, - }, - "range": Array [ - 226, - 250, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 17, - }, - "start": Object { - "column": 4, - "line": 17, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 293, - 294, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 17, - }, - "start": Object { - "column": 15, - "line": 17, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 17, - }, - "start": Object { - "column": 17, - "line": 17, - }, - }, - "name": "text", - "optional": false, - "range": Array [ - 306, - 310, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 30, - "line": 17, - }, - "start": Object { - "column": 17, - "line": 17, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 306, - 319, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 17, - }, - "start": Object { - "column": 23, - "line": 17, - }, - }, - "range": Array [ - 312, - 319, - ], - "raw": "\\"hello\\"", - "type": "Literal", - "value": "hello", - }, - }, - ], - "range": Array [ - 304, - 321, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 17, - }, - "start": Object { - "column": 8, - "line": 17, - }, - }, - "range": Array [ - 297, - 321, - ], - "type": "TSTypeAssertion", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 17, - }, - "start": Object { - "column": 9, - "line": 17, - }, - }, - "range": Array [ - 298, - 303, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 17, - }, - "start": Object { - "column": 9, - "line": 17, - }, - }, - "name": "const", - "optional": false, - "range": Array [ - 298, - 303, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 17, - }, - "start": Object { - "column": 4, - "line": 17, - }, - }, - "range": Array [ - 293, - 321, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 33, - "line": 17, - }, - "start": Object { - "column": 0, - "line": 17, - }, - }, - "range": Array [ - 289, - 322, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "Line", - "value": " Type '10'", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 35, - 62, - ], - "type": "Line", - "value": " Type 'readonly [10, 20]'", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 91, - 127, - ], - "type": "Line", - "value": " Type '{ readonly text: \\"hello\\" }'", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 10, - }, - }, - "range": Array [ - 165, - 177, - ], - "type": "Line", - "value": " Type '10'", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 13, - }, - }, - "range": Array [ - 198, - 225, - ], - "type": "Line", - "value": " Type 'readonly [10, 20]'", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 16, - }, - "start": Object { - "column": 0, - "line": 16, - }, - }, - "range": Array [ - 252, - 288, - ], - "type": "Line", - "value": " Type '{ readonly text: \\"hello\\" }'", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 18, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 13, - 323, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 27, - 32, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 63, - 66, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 72, - 74, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 76, - 78, - ], - "type": "Numeric", - "value": "20", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 80, - 82, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "range": Array [ - 83, - 88, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 5, - }, - "start": Object { - "column": 25, - "line": 5, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 128, - 131, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 8, - }, - }, - "range": Array [ - 134, - 135, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 136, - 137, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "range": Array [ - 138, - 142, - ], - "type": "Identifier", - "value": "text", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 14, - "line": 8, - }, - }, - "range": Array [ - 142, - 143, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 16, - "line": 8, - }, - }, - "range": Array [ - 144, - 151, - ], - "type": "String", - "value": "\\"hello\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 8, - }, - "start": Object { - "column": 24, - "line": 8, - }, - }, - "range": Array [ - 152, - 153, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 8, - }, - "start": Object { - "column": 26, - "line": 8, - }, - }, - "range": Array [ - 154, - 156, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 8, - }, - "start": Object { - "column": 29, - "line": 8, - }, - }, - "range": Array [ - 157, - 162, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 8, - }, - "start": Object { - "column": 34, - "line": 8, - }, - }, - "range": Array [ - 162, - 163, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 11, - }, - "start": Object { - "column": 0, - "line": 11, - }, - }, - "range": Array [ - 178, - 181, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "range": Array [ - 182, - 183, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 11, - }, - "start": Object { - "column": 6, - "line": 11, - }, - }, - "range": Array [ - 184, - 185, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 11, - }, - "start": Object { - "column": 8, - "line": 11, - }, - }, - "range": Array [ - 186, - 187, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 11, - }, - "start": Object { - "column": 9, - "line": 11, - }, - }, - "range": Array [ - 187, - 192, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 11, - }, - "start": Object { - "column": 14, - "line": 11, - }, - }, - "range": Array [ - 192, - 193, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 11, - }, - "start": Object { - "column": 15, - "line": 11, - }, - }, - "range": Array [ - 193, - 195, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 11, - }, - "start": Object { - "column": 17, - "line": 11, - }, - }, - "range": Array [ - 195, - 196, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 14, - }, - "start": Object { - "column": 0, - "line": 14, - }, - }, - "range": Array [ - 226, - 229, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 14, - }, - }, - "range": Array [ - 230, - 231, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 14, - }, - "start": Object { - "column": 6, - "line": 14, - }, - }, - "range": Array [ - 232, - 233, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 14, - }, - "start": Object { - "column": 8, - "line": 14, - }, - }, - "range": Array [ - 234, - 235, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 14, - }, - "start": Object { - "column": 9, - "line": 14, - }, - }, - "range": Array [ - 235, - 240, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 14, - }, - "start": Object { - "column": 14, - "line": 14, - }, - }, - "range": Array [ - 240, - 241, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 14, - }, - "start": Object { - "column": 15, - "line": 14, - }, - }, - "range": Array [ - 241, - 242, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 14, - }, - "start": Object { - "column": 16, - "line": 14, - }, - }, - "range": Array [ - 242, - 244, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 14, - }, - "start": Object { - "column": 18, - "line": 14, - }, - }, - "range": Array [ - 244, - 245, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 14, - }, - "start": Object { - "column": 20, - "line": 14, - }, - }, - "range": Array [ - 246, - 248, - ], - "type": "Numeric", - "value": "20", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 14, - }, - "start": Object { - "column": 22, - "line": 14, - }, - }, - "range": Array [ - 248, - 249, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 14, - }, - "start": Object { - "column": 23, - "line": 14, - }, - }, - "range": Array [ - 249, - 250, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 17, - }, - "start": Object { - "column": 0, - "line": 17, - }, - }, - "range": Array [ - 289, - 292, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 17, - }, - "start": Object { - "column": 4, - "line": 17, - }, - }, - "range": Array [ - 293, - 294, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 17, - }, - "start": Object { - "column": 6, - "line": 17, - }, - }, - "range": Array [ - 295, - 296, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 17, - }, - "start": Object { - "column": 8, - "line": 17, - }, - }, - "range": Array [ - 297, - 298, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 17, - }, - "start": Object { - "column": 9, - "line": 17, - }, - }, - "range": Array [ - 298, - 303, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 17, - }, - "start": Object { - "column": 14, - "line": 17, - }, - }, - "range": Array [ - 303, - 304, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 17, - }, - "start": Object { - "column": 15, - "line": 17, - }, - }, - "range": Array [ - 304, - 305, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 17, - }, - "start": Object { - "column": 17, - "line": 17, - }, - }, - "range": Array [ - 306, - 310, - ], - "type": "Identifier", - "value": "text", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 17, - }, - "start": Object { - "column": 21, - "line": 17, - }, - }, - "range": Array [ - 310, - 311, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 17, - }, - "start": Object { - "column": 23, - "line": 17, - }, - }, - "range": Array [ - 312, - 319, - ], - "type": "String", - "value": "\\"hello\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 17, - }, - "start": Object { - "column": 31, - "line": 17, - }, - }, - "range": Array [ - 320, - 321, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 17, - }, - "start": Object { - "column": 32, - "line": 17, - }, - }, - "range": Array [ - 321, - 322, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/const-enum.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/const-enum.src.ts.shot deleted file mode 100644 index 678e60a81ea0..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/const-enum.src.ts.shot +++ /dev/null @@ -1,347 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics const-enum.src 1`] = ` -Object { - "body": Array [ - Object { - "const": true, - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "members": Array [ - Object { - "computed": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "initializer": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 28, - ], - "type": "TSEnumMember", - }, - Object { - "computed": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "initializer": undefined, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "TSEnumMember", - }, - ], - "range": Array [ - 0, - 39, - ], - "type": "TSEnumDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/declare-class-with-optional-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/declare-class-with-optional-method.src.ts.shot deleted file mode 100644 index b9f3475ad295..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/declare-class-with-optional-method.src.ts.shot +++ /dev/null @@ -1,412 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics declare-class-with-optional-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": true, - "override": false, - "range": Array [ - 24, - 36, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": null, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 28, - 36, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 30, - 35, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "TSAnyKeyword", - }, - }, - "type": "TSEmptyBodyFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 38, - ], - "type": "ClassBody", - }, - "declare": true, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 13, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/declare-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/declare-function.src.ts.shot deleted file mode 100644 index 43bbd37c22b0..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/declare-function.src.ts.shot +++ /dev/null @@ -1,359 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics declare-function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": undefined, - "declare": true, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 21, - 32, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 32, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 42, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 41, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSDeclareFunction", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 16, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-nested.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-nested.src.ts.shot deleted file mode 100644 index ec9805e06bbd..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-nested.src.ts.shot +++ /dev/null @@ -1,2303 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics destructuring-assignment-nested.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 81, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 3, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 79, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 3, - 79, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 73, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 71, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 10, - 71, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 66, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 17, - 64, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 28, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 28, - 42, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 33, - 36, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 33, - 42, - ], - "right": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - ], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "ArrayExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 26, - 44, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 26, - 58, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 49, - 52, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 57, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 49, - 57, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 55, - "line": 1, - }, - }, - "range": Array [ - 55, - 56, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - ], - "loc": Object { - "end": Object { - "column": 57, - "line": 1, - }, - "start": Object { - "column": 54, - "line": 1, - }, - }, - "range": Array [ - 54, - 57, - ], - "type": "ArrayExpression", - }, - }, - ], - "range": Array [ - 47, - 58, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 59, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 22, - 59, - ], - "type": "ArrayPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 22, - 64, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 62, - "line": 1, - }, - }, - "range": Array [ - 62, - 64, - ], - "type": "ArrayExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 15, - 66, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 71, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 15, - 71, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 71, - "line": 1, - }, - "start": Object { - "column": 69, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 69, - 71, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 8, - 73, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 79, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 8, - 79, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 1, - }, - "start": Object { - "column": 76, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 76, - 79, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 81, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 127, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 1, - 127, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 127, - "line": 1, - }, - "start": Object { - "column": 84, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 89, - "line": 1, - }, - "start": Object { - "column": 86, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 86, - 89, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 126, - "line": 1, - }, - "start": Object { - "column": 86, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 86, - 126, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 126, - "line": 1, - }, - "start": Object { - "column": 91, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 96, - "line": 1, - }, - "start": Object { - "column": 93, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 93, - 96, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 124, - "line": 1, - }, - "start": Object { - "column": 93, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 93, - 124, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 124, - "line": 1, - }, - "start": Object { - "column": 98, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 103, - "line": 1, - }, - "start": Object { - "column": 100, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 100, - 103, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 122, - "line": 1, - }, - "start": Object { - "column": 100, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 100, - 122, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 107, - "line": 1, - }, - "start": Object { - "column": 106, - "line": 1, - }, - }, - "range": Array [ - 106, - 107, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - Object { - "loc": Object { - "end": Object { - "column": 121, - "line": 1, - }, - "start": Object { - "column": 109, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 114, - "line": 1, - }, - "start": Object { - "column": 111, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 111, - 114, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 119, - "line": 1, - }, - "start": Object { - "column": 111, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 111, - 119, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 118, - "line": 1, - }, - "start": Object { - "column": 117, - "line": 1, - }, - }, - "range": Array [ - 117, - 118, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - ], - "loc": Object { - "end": Object { - "column": 119, - "line": 1, - }, - "start": Object { - "column": 116, - "line": 1, - }, - }, - "range": Array [ - 116, - 119, - ], - "type": "ArrayExpression", - }, - }, - ], - "range": Array [ - 109, - 121, - ], - "type": "ObjectExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 122, - "line": 1, - }, - "start": Object { - "column": 105, - "line": 1, - }, - }, - "range": Array [ - 105, - 122, - ], - "type": "ArrayExpression", - }, - }, - ], - "range": Array [ - 98, - 124, - ], - "type": "ObjectExpression", - }, - }, - ], - "range": Array [ - 91, - 126, - ], - "type": "ObjectExpression", - }, - }, - ], - "range": Array [ - 84, - 127, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 129, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 129, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 130, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 6, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 52, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 52, - "line": 1, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 54, - "line": 1, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 55, - "line": 1, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 1, - }, - "start": Object { - "column": 56, - "line": 1, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 1, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 1, - }, - "start": Object { - "column": 60, - "line": 1, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 63, - "line": 1, - }, - "start": Object { - "column": 62, - "line": 1, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 66, - "line": 1, - }, - "start": Object { - "column": 65, - "line": 1, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 68, - "line": 1, - }, - "start": Object { - "column": 67, - "line": 1, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 70, - "line": 1, - }, - "start": Object { - "column": 69, - "line": 1, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 71, - "line": 1, - }, - "start": Object { - "column": 70, - "line": 1, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 1, - }, - "start": Object { - "column": 72, - "line": 1, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 75, - "line": 1, - }, - "start": Object { - "column": 74, - "line": 1, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 76, - "line": 1, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 1, - }, - "start": Object { - "column": 78, - "line": 1, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 81, - "line": 1, - }, - "start": Object { - "column": 80, - "line": 1, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 83, - "line": 1, - }, - "start": Object { - "column": 82, - "line": 1, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 85, - "line": 1, - }, - "start": Object { - "column": 84, - "line": 1, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 89, - "line": 1, - }, - "start": Object { - "column": 86, - "line": 1, - }, - }, - "range": Array [ - 86, - 89, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 90, - "line": 1, - }, - "start": Object { - "column": 89, - "line": 1, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 92, - "line": 1, - }, - "start": Object { - "column": 91, - "line": 1, - }, - }, - "range": Array [ - 91, - 92, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 96, - "line": 1, - }, - "start": Object { - "column": 93, - "line": 1, - }, - }, - "range": Array [ - 93, - 96, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 97, - "line": 1, - }, - "start": Object { - "column": 96, - "line": 1, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 99, - "line": 1, - }, - "start": Object { - "column": 98, - "line": 1, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 103, - "line": 1, - }, - "start": Object { - "column": 100, - "line": 1, - }, - }, - "range": Array [ - 100, - 103, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 104, - "line": 1, - }, - "start": Object { - "column": 103, - "line": 1, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 106, - "line": 1, - }, - "start": Object { - "column": 105, - "line": 1, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 107, - "line": 1, - }, - "start": Object { - "column": 106, - "line": 1, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 108, - "line": 1, - }, - "start": Object { - "column": 107, - "line": 1, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 110, - "line": 1, - }, - "start": Object { - "column": 109, - "line": 1, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 114, - "line": 1, - }, - "start": Object { - "column": 111, - "line": 1, - }, - }, - "range": Array [ - 111, - 114, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 115, - "line": 1, - }, - "start": Object { - "column": 114, - "line": 1, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 117, - "line": 1, - }, - "start": Object { - "column": 116, - "line": 1, - }, - }, - "range": Array [ - 116, - 117, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 118, - "line": 1, - }, - "start": Object { - "column": 117, - "line": 1, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 119, - "line": 1, - }, - "start": Object { - "column": 118, - "line": 1, - }, - }, - "range": Array [ - 118, - 119, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 121, - "line": 1, - }, - "start": Object { - "column": 120, - "line": 1, - }, - }, - "range": Array [ - 120, - 121, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 122, - "line": 1, - }, - "start": Object { - "column": 121, - "line": 1, - }, - }, - "range": Array [ - 121, - 122, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 124, - "line": 1, - }, - "start": Object { - "column": 123, - "line": 1, - }, - }, - "range": Array [ - 123, - 124, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 126, - "line": 1, - }, - "start": Object { - "column": 125, - "line": 1, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 127, - "line": 1, - }, - "start": Object { - "column": 126, - "line": 1, - }, - }, - "range": Array [ - 126, - 127, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 128, - "line": 1, - }, - "start": Object { - "column": 127, - "line": 1, - }, - }, - "range": Array [ - 127, - 128, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 129, - "line": 1, - }, - "start": Object { - "column": 128, - "line": 1, - }, - }, - "range": Array [ - 128, - 129, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-object.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-object.src.ts.shot deleted file mode 100644 index cee6ef4b9dc2..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-object.src.ts.shot +++ /dev/null @@ -1,406 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics destructuring-assignment-object.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 3, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 3, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 3, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 3, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 9, - 11, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 13, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 1, - 19, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 6, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-property.src.ts.shot deleted file mode 100644 index 826e02c3a475..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment-property.src.ts.shot +++ /dev/null @@ -1,508 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics destructuring-assignment-property.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 15, - 23, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 15, - 23, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "ArrayExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 13, - 25, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 13, - 31, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 28, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 37, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment.src.ts.shot deleted file mode 100644 index 88aa09dc4109..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/destructuring-assignment.src.ts.shot +++ /dev/null @@ -1,406 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics destructuring-assignment.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 3, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 3, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 3, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 3, - 11, - ], - "right": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "ArrayExpression", - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 13, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 1, - 19, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 6, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/directive-in-module.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/directive-in-module.src.ts.shot deleted file mode 100644 index 2eb6fecd04be..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/directive-in-module.src.ts.shot +++ /dev/null @@ -1,473 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics directive-in-module.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 15, - 27, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 15, - 28, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 35, - 40, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 31, - 41, - ], - "type": "VariableDeclaration", - }, - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 44, - 56, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 44, - 57, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 59, - ], - "type": "TSModuleBlock", - }, - "declare": false, - "global": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 59, - ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 60, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 15, - 27, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 44, - 56, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/directive-in-namespace.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/directive-in-namespace.src.ts.shot deleted file mode 100644 index ca335e16698b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/directive-in-namespace.src.ts.shot +++ /dev/null @@ -1,473 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics directive-in-namespace.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "directive": "use strict", - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 30, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 31, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 38, - 43, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 34, - 44, - ], - "type": "VariableDeclaration", - }, - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 47, - 59, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 47, - 60, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 62, - ], - "type": "TSModuleBlock", - }, - "declare": false, - "global": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 62, - ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 63, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Identifier", - "value": "namespace", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 30, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 47, - 59, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/dynamic-import-with-import-assertions.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/dynamic-import-with-import-assertions.src.ts.shot deleted file mode 100644 index 3df92c53024a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/dynamic-import-with-import-assertions.src.ts.shot +++ /dev/null @@ -1,494 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics dynamic-import-with-import-assertions.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "attributes": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "assert", - "optional": false, - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 16, - 40, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "type", - "optional": false, - "range": Array [ - 26, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 26, - 38, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "raw": "\\"json\\"", - "type": "Literal", - "value": "json", - }, - }, - ], - "range": Array [ - 24, - 40, - ], - "type": "ObjectExpression", - }, - }, - ], - "range": Array [ - 14, - 42, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "type": "ImportExpression", - }, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - "value": "assert", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "String", - "value": "\\"json\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-all-with-import-assertions.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-all-with-import-assertions.src.ts.shot deleted file mode 100644 index c0a1ebe8438b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-all-with-import-assertions.src.ts.shot +++ /dev/null @@ -1,322 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-all-with-import-assertions.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [ - Object { - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "type", - "optional": false, - "range": Array [ - 29, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 41, - ], - "type": "ImportAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "raw": "\\"json\\"", - "type": "Literal", - "value": "json", - }, - }, - ], - "exportKind": "value", - "exported": null, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 19, - ], - "raw": "\\"mod\\"", - "type": "Literal", - "value": "mod", - }, - "type": "ExportAllDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 19, - ], - "type": "String", - "value": "\\"mod\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "Identifier", - "value": "assert", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 33, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "String", - "value": "\\"json\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-as-namespace.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-as-namespace.src.ts.shot deleted file mode 100644 index 762447f79f6c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-as-namespace.src.ts.shot +++ /dev/null @@ -1,155 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-as-namespace.src 1`] = ` -Object { - "body": Array [ - Object { - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "type": "TSNamespaceExportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - "value": "namespace", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-assignment.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-assignment.src.ts.shot deleted file mode 100644 index e32083119d80..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-assignment.src.ts.shot +++ /dev/null @@ -1,137 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-assignment.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "TSExportAssignment", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-declare-const-named-enum.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-declare-const-named-enum.src.ts.shot deleted file mode 100644 index 6b8c64ddcaeb..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-declare-const-named-enum.src.ts.shot +++ /dev/null @@ -1,404 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-declare-const-named-enum.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "const": true, - "declare": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "members": Array [ - Object { - "computed": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 36, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "initializer": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 36, - 43, - ], - "type": "TSEnumMember", - }, - Object { - "computed": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 49, - 52, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "initializer": undefined, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 49, - 52, - ], - "type": "TSEnumMember", - }, - ], - "range": Array [ - 7, - 54, - ], - "type": "TSEnumDeclaration", - }, - "exportKind": "type", - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 54, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 55, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 36, - 39, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 49, - 52, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-declare-named-enum.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-declare-named-enum.src.ts.shot deleted file mode 100644 index 01a333971377..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-declare-named-enum.src.ts.shot +++ /dev/null @@ -1,386 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-declare-named-enum.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "const": false, - "declare": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "members": Array [ - Object { - "computed": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 30, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "initializer": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 30, - 37, - ], - "type": "TSEnumMember", - }, - Object { - "computed": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 43, - 46, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "initializer": undefined, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 43, - 46, - ], - "type": "TSEnumMember", - }, - ], - "range": Array [ - 7, - 48, - ], - "type": "TSEnumDeclaration", - }, - "exportKind": "type", - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 43, - 46, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-class-with-generic.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-class-with-generic.src.ts.shot deleted file mode 100644 index 5ffbcb3602dc..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-class-with-generic.src.ts.shot +++ /dev/null @@ -1,292 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-default-class-with-generic.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 28, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": null, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 28, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 20, - 23, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-class-with-multiple-generics.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-class-with-multiple-generics.src.ts.shot deleted file mode 100644 index da88cdb4430b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-class-with-multiple-generics.src.ts.shot +++ /dev/null @@ -1,370 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-default-class-with-multiple-generics.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": null, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 31, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeParameter", - }, - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 24, - 25, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 20, - 26, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-interface.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-interface.src.ts.shot deleted file mode 100644 index 62ff5e71b50a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-interface.src.ts.shot +++ /dev/null @@ -1,402 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-default-interface.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "method1", - "optional": false, - "range": Array [ - 31, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [], - "range": Array [ - 31, - 47, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 42, - 46, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 49, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 49, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 24, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "Identifier", - "value": "method1", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 42, - 46, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-class-with-generic.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-class-with-generic.src.ts.shot deleted file mode 100644 index d907ed8d5840..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-class-with-generic.src.ts.shot +++ /dev/null @@ -1,315 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-named-class-with-generic.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 24, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 17, - 18, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 16, - 19, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-class-with-multiple-generics.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-class-with-multiple-generics.src.ts.shot deleted file mode 100644 index 0aa3eb708214..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-class-with-multiple-generics.src.ts.shot +++ /dev/null @@ -1,393 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-named-class-with-multiple-generics.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 27, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 27, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 17, - 18, - ], - "type": "TSTypeParameter", - }, - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 20, - 21, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 16, - 22, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-number.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-number.src.ts.shot deleted file mode 100644 index 6f44a4685e2e..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-number.src.ts.shot +++ /dev/null @@ -1,290 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-named-enum-computed-number.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "const": false, - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "members": Array [ - Object { - "computed": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "initializer": undefined, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "TSEnumMember", - }, - ], - "range": Array [ - 7, - 28, - ], - "type": "TSEnumDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-string.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-string.src.ts.shot deleted file mode 100644 index 45f6879979c1..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-string.src.ts.shot +++ /dev/null @@ -1,290 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-named-enum-computed-string.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "const": false, - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "members": Array [ - Object { - "computed": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 23, - 28, - ], - "raw": "'baz'", - "type": "Literal", - "value": "baz", - }, - "initializer": undefined, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 29, - ], - "type": "TSEnumMember", - }, - ], - "range": Array [ - 7, - 32, - ], - "type": "TSEnumDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 23, - 28, - ], - "type": "String", - "value": "'baz'", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-var-ref.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-var-ref.src.ts.shot deleted file mode 100644 index 15f9ab6adcb1..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum-computed-var-ref.src.ts.shot +++ /dev/null @@ -1,292 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-named-enum-computed-var-ref.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "const": false, - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "members": Array [ - Object { - "computed": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "initializer": undefined, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "TSEnumMember", - }, - ], - "range": Array [ - 7, - 28, - ], - "type": "TSEnumDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum.src.ts.shot deleted file mode 100644 index 2ba70f6dbfcb..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-named-enum.src.ts.shot +++ /dev/null @@ -1,368 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-named-enum.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "const": false, - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "members": Array [ - Object { - "computed": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "initializer": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 29, - ], - "type": "TSEnumMember", - }, - Object { - "computed": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 35, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "initializer": undefined, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 35, - 38, - ], - "type": "TSEnumMember", - }, - ], - "range": Array [ - 7, - 40, - ], - "type": "TSEnumDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 35, - 38, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-star-as-ns-from.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-star-as-ns-from.src.ts.shot deleted file mode 100644 index d2e375c0d85b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-star-as-ns-from.src.ts.shot +++ /dev/null @@ -1,212 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-star-as-ns-from.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 26, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "type": "ExportAllDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 20, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 26, - ], - "type": "String", - "value": "'bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-type-as.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-type-as.src.ts.shot deleted file mode 100644 index 6ff8663ab0d1..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-type-as.src.ts.shot +++ /dev/null @@ -1,254 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-type-as.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "type", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "source": null, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 14, - 20, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-type-from-as.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-type-from-as.src.ts.shot deleted file mode 100644 index bbc8ed36a354..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-type-from-as.src.ts.shot +++ /dev/null @@ -1,308 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-type-from-as.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "type", - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 33, - ], - "raw": "'./a'", - "type": "Literal", - "value": "./a", - }, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 14, - 20, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 27, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 33, - ], - "type": "String", - "value": "'./a'", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-type-from.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-type-from.src.ts.shot deleted file mode 100644 index cc28ae28863f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-type-from.src.ts.shot +++ /dev/null @@ -1,272 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-type-from.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "type", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 30, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 14, - 17, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 30, - ], - "type": "String", - "value": "'bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-type.src.ts.shot deleted file mode 100644 index 9d2e60e63f3a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-type.src.ts.shot +++ /dev/null @@ -1,218 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-type.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "type", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "source": null, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 14, - 17, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-with-import-assertions.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-with-import-assertions.src.ts.shot deleted file mode 100644 index 0899fc9e9710..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-with-import-assertions.src.ts.shot +++ /dev/null @@ -1,420 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics export-with-import-assertions.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [ - Object { - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "type", - "optional": false, - "range": Array [ - 35, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 47, - ], - "type": "ImportAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 47, - ], - "raw": "\\"json\\"", - "type": "Literal", - "value": "json", - }, - }, - ], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 25, - ], - "raw": "\\"mod\\"", - "type": "Literal", - "value": "mod", - }, - "specifiers": Array [ - Object { - "exportKind": "value", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 9, - 12, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 25, - ], - "type": "String", - "value": "\\"mod\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Identifier", - "value": "assert", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 39, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 47, - ], - "type": "String", - "value": "\\"json\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/function-anonymus-with-type-parameters.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/function-anonymus-with-type-parameters.src.ts.shot deleted file mode 100644 index 4aecf98d26dd..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/function-anonymus-with-type-parameters.src.ts.shot +++ /dev/null @@ -1,608 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics function-anonymus-with-type-parameters.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 38, - 47, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 49, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 23, - 32, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 32, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 10, - 49, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 20, - 21, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 19, - 22, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 49, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 18, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/function-anynomus-with-return-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/function-anynomus-with-return-type.src.ts.shot deleted file mode 100644 index c315d367f849..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/function-anynomus-with-return-type.src.ts.shot +++ /dev/null @@ -1,361 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics function-anynomus-with-return-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 31, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 10, - 31, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 27, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 27, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 31, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 18, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 27, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/function-overloads.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/function-overloads.src.ts.shot deleted file mode 100644 index 0d2e375cd3ee..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/function-overloads.src.ts.shot +++ /dev/null @@ -1,1358 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics function-overloads.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "async": false, - "body": undefined, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 18, - 27, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 27, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 27, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 7, - 37, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "TSDeclareFunction", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - Object { - "assertions": Array [], - "declaration": Object { - "async": false, - "body": undefined, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 54, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 56, - 65, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 57, - 65, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 59, - 65, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 45, - 75, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 66, - 74, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 68, - 74, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSDeclareFunction", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 38, - 75, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - Object { - "assertions": Array [], - "declaration": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 142, - 143, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 135, - 144, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 55, - "line": 3, - }, - }, - "range": Array [ - 131, - 146, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 92, - 93, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 94, - 112, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 95, - 112, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 97, - 112, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 97, - 103, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 106, - 112, - ], - "type": "TSNumberKeyword", - }, - ], - }, - }, - }, - ], - "range": Array [ - 83, - 146, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 3, - }, - "start": Object { - "column": 37, - "line": 3, - }, - }, - "range": Array [ - 113, - 130, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 3, - }, - }, - "range": Array [ - 115, - 130, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 3, - }, - }, - "range": Array [ - 115, - 121, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 3, - }, - "start": Object { - "column": 48, - "line": 3, - }, - }, - "range": Array [ - 124, - 130, - ], - "type": "TSNumberKeyword", - }, - ], - }, - }, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 76, - 146, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 147, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 27, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 45, - 53, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 59, - 65, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 68, - 74, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 76, - 82, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 83, - 91, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 93, - 94, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 97, - 103, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 104, - 105, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 106, - 112, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 37, - "line": 3, - }, - }, - "range": Array [ - 113, - 114, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 3, - }, - }, - "range": Array [ - 115, - 121, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 46, - "line": 3, - }, - }, - "range": Array [ - 122, - 123, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 3, - }, - "start": Object { - "column": 48, - "line": 3, - }, - }, - "range": Array [ - 124, - 130, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 3, - }, - "start": Object { - "column": 55, - "line": 3, - }, - }, - "range": Array [ - 131, - 132, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 135, - 141, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 142, - 143, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 143, - 144, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 145, - 146, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-await.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-await.src.ts.shot deleted file mode 100644 index 9514f6b8a753..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-await.src.ts.shot +++ /dev/null @@ -1,367 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics function-with-await.src 1`] = ` -Object { - "body": Array [ - Object { - "async": true, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "future", - "optional": false, - "range": Array [ - 40, - 46, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 34, - 46, - ], - "type": "AwaitExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 34, - 47, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 49, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "hope", - "optional": false, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "future", - "optional": false, - "range": Array [ - 20, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 0, - 49, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "value": "hope", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "Identifier", - "value": "future", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 34, - 39, - ], - "type": "Identifier", - "value": "await", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "Identifier", - "value": "future", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-object-type-with-optional-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-object-type-with-optional-properties.src.ts.shot deleted file mode 100644 index 972236437d27..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-object-type-with-optional-properties.src.ts.shot +++ /dev/null @@ -1,779 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics function-with-object-type-with-optional-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 51, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 14, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 19, - 22, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 13, - 45, - ], - "type": "ObjectPattern", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "members": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "optional": true, - "range": Array [ - 26, - 39, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 40, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "optional": true, - "range": Array [ - 40, - 44, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 25, - 45, - ], - "type": "TSTypeLiteral", - }, - }, - }, - ], - "range": Array [ - 0, - 51, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 43, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-object-type-without-annotation.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-object-type-without-annotation.src.ts.shot deleted file mode 100644 index 15aa7f496edd..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-object-type-without-annotation.src.ts.shot +++ /dev/null @@ -1,743 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics function-with-object-type-without-annotation.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 49, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 14, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 19, - 22, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 13, - 43, - ], - "type": "ObjectPattern", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 43, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "members": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 26, - 38, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "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": "TSStringKeyword", - }, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 39, - 42, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 25, - 43, - ], - "type": "TSTypeLiteral", - }, - }, - }, - ], - "range": Array [ - 0, - 49, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters-that-have-comments.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters-that-have-comments.src.ts.shot deleted file mode 100644 index 57d31962b119..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters-that-have-comments.src.ts.shot +++ /dev/null @@ -1,331 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics function-with-type-parameters-that-have-comments.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 35, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "compare", - "optional": false, - "range": Array [ - 9, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 35, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 28, - 29, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 16, - 30, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 28, - ], - "type": "Block", - "value": "comment", - }, - ], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 16, - ], - "type": "Identifier", - "value": "compare", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters-with-constraint.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters-with-constraint.src.ts.shot deleted file mode 100644 index 9f8c82cd7ce4..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters-with-constraint.src.ts.shot +++ /dev/null @@ -1,698 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics function-with-type-parameters-with-constraint.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 40, - 49, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 51, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 25, - 29, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 0, - 51, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 21, - 23, - ], - "type": "TSTypeLiteral", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 11, - 23, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 10, - 24, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 20, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters.src.ts.shot deleted file mode 100644 index 3105d1e91355..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-type-parameters.src.ts.shot +++ /dev/null @@ -1,627 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics function-with-type-parameters.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 29, - 38, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 40, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 0, - 40, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 11, - 12, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 10, - 13, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-types-assignation.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-types-assignation.src.ts.shot deleted file mode 100644 index 2c5e6ce2fea2..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-types-assignation.src.ts.shot +++ /dev/null @@ -1,946 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics function-with-types-assignation.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 89, - 93, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 82, - 94, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 78, - "line": 1, - }, - }, - "range": Array [ - 78, - 96, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "message", - "optional": false, - "range": Array [ - 9, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 17, - 28, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "decorators": Array [], - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "age", - "optional": false, - "range": Array [ - 30, - 40, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 40, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 30, - 46, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 46, - ], - "raw": "100", - "type": "Literal", - "value": 100, - }, - "type": "AssignmentPattern", - "typeAnnotation": undefined, - }, - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "name": "args", - "optional": false, - "range": Array [ - 51, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 48, - 69, - ], - "type": "RestElement", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 55, - "line": 1, - }, - }, - "range": Array [ - 55, - 69, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 56, - "line": 1, - }, - }, - "range": Array [ - 56, - 69, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 61, - "line": 1, - }, - "start": Object { - "column": 56, - "line": 1, - }, - }, - "name": "Array", - "optional": false, - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 68, - "line": 1, - }, - "start": Object { - "column": 62, - "line": 1, - }, - }, - "range": Array [ - 62, - 68, - ], - "type": "TSStringKeyword", - }, - ], - "range": Array [ - 61, - 69, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - "value": undefined, - }, - ], - "range": Array [ - 0, - 96, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 70, - "line": 1, - }, - }, - "range": Array [ - 70, - 77, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 71, - "line": 1, - }, - }, - "range": Array [ - 71, - 77, - ], - "type": "TSStringKeyword", - }, - }, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 97, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 16, - ], - "type": "Identifier", - "value": "message", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "Identifier", - "value": "age", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 46, - ], - "type": "Numeric", - "value": "100", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "range": Array [ - 48, - 51, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "range": Array [ - 51, - 55, - ], - "type": "Identifier", - "value": "args", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 55, - "line": 1, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 1, - }, - "start": Object { - "column": 56, - "line": 1, - }, - }, - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - "value": "Array", - }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 68, - "line": 1, - }, - "start": Object { - "column": 62, - "line": 1, - }, - }, - "range": Array [ - 62, - 68, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 68, - "line": 1, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 70, - "line": 1, - }, - "start": Object { - "column": 69, - "line": 1, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 71, - "line": 1, - }, - "start": Object { - "column": 70, - "line": 1, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 71, - "line": 1, - }, - }, - "range": Array [ - 71, - 77, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 1, - }, - "start": Object { - "column": 78, - "line": 1, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 82, - 88, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 89, - 93, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 93, - 94, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-types.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-types.src.ts.shot deleted file mode 100644 index 844121df237b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/function-with-types.src.ts.shot +++ /dev/null @@ -1,469 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics function-with-types.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 50, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 43, - 55, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 57, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "message", - "optional": false, - "range": Array [ - 9, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 17, - 28, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 57, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "TSStringKeyword", - }, - }, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 58, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 16, - ], - "type": "Identifier", - "value": "message", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 43, - 49, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 50, - 54, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/global-this.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/global-this.src.ts.shot deleted file mode 100644 index 807c5602ad29..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/global-this.src.ts.shot +++ /dev/null @@ -1,868 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics global-this.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "abc", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 32, - 35, - ], - "raw": "100", - "type": "Literal", - "value": 100, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 26, - 35, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 22, - 36, - ], - "type": "VariableDeclaration", - }, - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "name": "globalThis", - "optional": false, - "range": Array [ - 69, - 79, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "name": "abc", - "optional": false, - "range": Array [ - 80, - 83, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 69, - 83, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "operator": "=", - "range": Array [ - 69, - 89, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 86, - 89, - ], - "raw": "200", - "type": "Literal", - "value": 200, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 69, - 90, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "name": "answer", - "optional": false, - "range": Array [ - 97, - 103, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 9, - }, - "start": Object { - "column": 13, - "line": 9, - }, - }, - "range": Array [ - 106, - 108, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 97, - 108, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 93, - 109, - ], - "type": "VariableDeclaration", - }, - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 12, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 12, - }, - }, - "name": "globalThis", - "optional": false, - "range": Array [ - 178, - 188, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 12, - }, - "start": Object { - "column": 11, - "line": 12, - }, - }, - "name": "answer", - "optional": false, - "range": Array [ - 189, - 195, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 178, - 195, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 12, - }, - }, - "operator": "=", - "range": Array [ - 178, - 204, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 12, - }, - "start": Object { - "column": 20, - "line": 12, - }, - }, - "range": Array [ - 198, - 204, - ], - "raw": "333333", - "type": "Literal", - "value": 333333, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 12, - }, - }, - "range": Array [ - 178, - 205, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "type": "Line", - "value": " in a global file:", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 38, - 68, - ], - "type": "Line", - "value": " Refers to 'abc' from above.", - }, - Object { - "loc": Object { - "end": Object { - "column": 66, - "line": 11, - }, - "start": Object { - "column": 0, - "line": 11, - }, - }, - "range": Array [ - 111, - 177, - ], - "type": "Line", - "value": " error! Property 'answer' does not exist on 'typeof globalThis'.", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 22, - 206, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "abc", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "Numeric", - "value": "100", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 69, - 79, - ], - "type": "Identifier", - "value": "globalThis", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 80, - 83, - ], - "type": "Identifier", - "value": "abc", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 15, - "line": 6, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 86, - 89, - ], - "type": "Numeric", - "value": "200", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 20, - "line": 6, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 93, - 96, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 97, - 103, - ], - "type": "Identifier", - "value": "answer", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 104, - 105, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 9, - }, - "start": Object { - "column": 13, - "line": 9, - }, - }, - "range": Array [ - 106, - 108, - ], - "type": "Numeric", - "value": "42", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 15, - "line": 9, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 12, - }, - }, - "range": Array [ - 178, - 188, - ], - "type": "Identifier", - "value": "globalThis", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 12, - }, - "start": Object { - "column": 10, - "line": 12, - }, - }, - "range": Array [ - 188, - 189, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 12, - }, - "start": Object { - "column": 11, - "line": 12, - }, - }, - "range": Array [ - 189, - 195, - ], - "type": "Identifier", - "value": "answer", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 12, - }, - "start": Object { - "column": 18, - "line": 12, - }, - }, - "range": Array [ - 196, - 197, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 12, - }, - "start": Object { - "column": 20, - "line": 12, - }, - }, - "range": Array [ - 198, - 204, - ], - "type": "Numeric", - "value": "333333", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 12, - }, - "start": Object { - "column": 26, - "line": 12, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-declaration.src.ts.shot deleted file mode 100644 index 9a2a76e62333..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-declaration.src.ts.shot +++ /dev/null @@ -1,247 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics import-equal-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "importKind": "value", - "isExport": false, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "moduleReference": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 26, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 27, - ], - "type": "TSExternalModuleReference", - }, - "range": Array [ - 0, - 28, - ], - "type": "TSImportEqualsDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 20, - ], - "type": "Identifier", - "value": "require", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 26, - ], - "type": "String", - "value": "'bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-type-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-type-declaration.src.ts.shot deleted file mode 100644 index 5528903ee6b6..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-type-declaration.src.ts.shot +++ /dev/null @@ -1,265 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics import-equal-type-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "importKind": "type", - "isExport": false, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "moduleReference": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 31, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 32, - ], - "type": "TSExternalModuleReference", - }, - "range": Array [ - 0, - 33, - ], - "type": "TSImportEqualsDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 25, - ], - "type": "Identifier", - "value": "require", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 31, - ], - "type": "String", - "value": "'bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-declaration.src.ts.shot deleted file mode 100644 index d8e642b05900..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-declaration.src.ts.shot +++ /dev/null @@ -1,265 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics import-export-equal-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "importKind": "value", - "isExport": true, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "moduleReference": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 33, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 34, - ], - "type": "TSExternalModuleReference", - }, - "range": Array [ - 0, - 35, - ], - "type": "TSImportEqualsDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 27, - ], - "type": "Identifier", - "value": "require", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 33, - ], - "type": "String", - "value": "'bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-type-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-type-declaration.src.ts.shot deleted file mode 100644 index e209bf0617dd..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-type-declaration.src.ts.shot +++ /dev/null @@ -1,283 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics import-export-equal-type-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "importKind": "type", - "isExport": true, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "moduleReference": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 38, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 39, - ], - "type": "TSExternalModuleReference", - }, - "range": Array [ - 0, - 40, - ], - "type": "TSImportEqualsDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 32, - ], - "type": "Identifier", - "value": "require", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 38, - ], - "type": "String", - "value": "'bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-default.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-default.src.ts.shot deleted file mode 100644 index 37f4d356ac24..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-default.src.ts.shot +++ /dev/null @@ -1,213 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics import-type-default.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "type", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 26, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 12, - 15, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 20, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 26, - ], - "type": "String", - "value": "'bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-empty.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-empty.src.ts.shot deleted file mode 100644 index bf0a2bf3d216..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-empty.src.ts.shot +++ /dev/null @@ -1,214 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics import-type-empty.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 55, - 80, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 72, - 79, - ], - "raw": "'./foo'", - "type": "Literal", - "value": "./foo", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "name": "type", - "optional": false, - "range": Array [ - 62, - 66, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 62, - 66, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 54, - ], - "type": "Line", - "value": " this should be treated as a normal import statement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 55, - 81, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 62, - 66, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 67, - 71, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 72, - 79, - ], - "type": "String", - "value": "'./foo'", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-error.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-error.src.ts.shot deleted file mode 100644 index e5b0845f2ad8..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-error.src.ts.shot +++ /dev/null @@ -1,345 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics import-type-error.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "type", - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 35, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 12, - 15, - ], - "type": "ImportDefaultSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 19, - 22, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 29, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 35, - ], - "type": "String", - "value": "'bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-named-as.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-named-as.src.ts.shot deleted file mode 100644 index 9ad033cfb1c4..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-named-as.src.ts.shot +++ /dev/null @@ -1,307 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics import-type-named-as.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "type", - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 37, - ], - "raw": "'baz'", - "type": "Literal", - "value": "baz", - }, - "specifiers": Array [ - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 14, - 24, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 37, - ], - "type": "String", - "value": "'baz'", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-named.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-named.src.ts.shot deleted file mode 100644 index 07ec1f7ce924..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-named.src.ts.shot +++ /dev/null @@ -1,367 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics import-type-named.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "type", - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 35, - ], - "raw": "'baz'", - "type": "Literal", - "value": "baz", - }, - "specifiers": Array [ - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 14, - 17, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 19, - 22, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 29, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 35, - ], - "type": "String", - "value": "'baz'", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-star-as-ns.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-star-as-ns.src.ts.shot deleted file mode 100644 index 49e8bfdb5e4c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-type-star-as-ns.src.ts.shot +++ /dev/null @@ -1,249 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics import-type-star-as-ns.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "type", - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 33, - ], - "raw": "'./bar'", - "type": "Literal", - "value": "./bar", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 12, - 20, - ], - "type": "ImportNamespaceSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 33, - ], - "type": "String", - "value": "'./bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-with-import-assertions.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-with-import-assertions.src.ts.shot deleted file mode 100644 index 7da9b8788b79..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-with-import-assertions.src.ts.shot +++ /dev/null @@ -1,361 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics import-with-import-assertions.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [ - Object { - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "type", - "optional": false, - "range": Array [ - 31, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 43, - ], - "type": "ImportAttribute", - "value": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 43, - ], - "raw": "\\"json\\"", - "type": "Literal", - "value": "json", - }, - }, - ], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 46, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "raw": "\\"mod\\"", - "type": "Literal", - "value": "mod", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 7, - 10, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 15, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "String", - "value": "\\"mod\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "assert", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 35, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 43, - ], - "type": "String", - "value": "\\"json\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-extends-multiple.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-extends-multiple.src.ts.shot deleted file mode 100644 index b501a9707cda..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-extends-multiple.src.ts.shot +++ /dev/null @@ -1,309 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-extends-multiple.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 34, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "TSInterfaceHeritage", - "typeParameters": undefined, - }, - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "Baz", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "TSInterfaceHeritage", - "typeParameters": undefined, - }, - ], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "Baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-extends.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-extends.src.ts.shot deleted file mode 100644 index 8524d88e0202..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-extends.src.ts.shot +++ /dev/null @@ -1,234 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-extends.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "TSInterfaceHeritage", - "typeParameters": undefined, - }, - ], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-type-parameters.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-type-parameters.src.ts.shot deleted file mode 100644 index b508cbae1376..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-type-parameters.src.ts.shot +++ /dev/null @@ -1,272 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-type-parameters.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 14, - 15, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 13, - 16, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-all-property-types.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-all-property-types.src.ts.shot deleted file mode 100644 index 8bc85fa7687e..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-all-property-types.src.ts.shot +++ /dev/null @@ -1,3196 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-with-all-property-types.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "baa", - "optional": false, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 20, - 32, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 23, - 31, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "TSNumberKeyword", - }, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 37, - 40, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "optional": true, - "range": Array [ - 37, - 50, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 41, - 49, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 43, - 49, - ], - "type": "TSNumberKeyword", - }, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "name": "bax", - "optional": false, - "range": Array [ - 56, - 59, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "optional": false, - "range": Array [ - 55, - 69, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 60, - 68, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 62, - 68, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "accessibility": undefined, - "computed": true, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 75, - 78, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "optional": true, - "range": Array [ - 74, - 89, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 80, - 88, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 82, - 88, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "accessibility": undefined, - "export": false, - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "parameters": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "name": "eee", - "optional": false, - "range": Array [ - 95, - 106, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 98, - 106, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 100, - 106, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 94, - 116, - ], - "readonly": false, - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 107, - 115, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 109, - 115, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "doo", - "optional": false, - "range": Array [ - 121, - 124, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "optional": false, - "params": Array [], - "range": Array [ - 121, - 133, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "range": Array [ - 126, - 132, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 128, - 132, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "name": "coo", - "optional": false, - "range": Array [ - 138, - 141, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 24, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "optional": true, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 143, - 144, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 8, - }, - "start": Object { - "column": 12, - "line": 8, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 146, - 147, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 149, - 150, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 138, - 158, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 17, - "line": 8, - }, - }, - "range": Array [ - 151, - 157, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 19, - "line": 8, - }, - }, - "range": Array [ - 153, - 157, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - Object { - "accessibility": undefined, - "computed": true, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "name": "loo", - "optional": false, - "range": Array [ - 164, - 167, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 26, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "optional": true, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 170, - 171, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 9, - }, - "start": Object { - "column": 14, - "line": 9, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 173, - 174, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 176, - 177, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 163, - 185, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "range": Array [ - 178, - 184, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 9, - }, - "start": Object { - "column": 21, - "line": 9, - }, - }, - "range": Array [ - 180, - 184, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "name": "boo", - "optional": false, - "range": Array [ - 190, - 193, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 26, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 10, - }, - "start": Object { - "column": 11, - "line": 10, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 197, - 198, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 14, - "line": 10, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 200, - 201, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 10, - }, - "start": Object { - "column": 17, - "line": 10, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 203, - 204, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 190, - 212, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 10, - }, - "start": Object { - "column": 19, - "line": 10, - }, - }, - "range": Array [ - 205, - 211, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 10, - }, - "start": Object { - "column": 21, - "line": 10, - }, - }, - "range": Array [ - 207, - 211, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 10, - }, - "start": Object { - "column": 7, - "line": 10, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "name": "J", - "optional": false, - "range": Array [ - 194, - 195, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 194, - 195, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 193, - 196, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 11, - }, - "start": Object { - "column": 9, - "line": 11, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 222, - 223, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 11, - }, - "start": Object { - "column": 12, - "line": 11, - }, - }, - "name": "b", - "optional": true, - "range": Array [ - 225, - 227, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 217, - 237, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 11, - }, - "start": Object { - "column": 15, - "line": 11, - }, - }, - "range": Array [ - 228, - 236, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 11, - }, - "start": Object { - "column": 17, - "line": 11, - }, - }, - "range": Array [ - 230, - 236, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSConstructSignatureDeclaration", - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 12, - }, - "start": Object { - "column": 4, - "line": 12, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 12, - "line": 12, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 250, - 251, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 12, - }, - "start": Object { - "column": 15, - "line": 12, - }, - }, - "name": "b", - "optional": true, - "range": Array [ - 253, - 255, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 242, - 265, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 12, - }, - "start": Object { - "column": 18, - "line": 12, - }, - }, - "range": Array [ - 256, - 264, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 12, - }, - "start": Object { - "column": 20, - "line": 12, - }, - }, - "range": Array [ - 258, - 264, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSConstructSignatureDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 12, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 12, - }, - }, - "name": "F", - "optional": false, - "range": Array [ - 247, - 248, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 247, - 248, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 246, - 249, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 267, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 267, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 15, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 269, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "value": "baa", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 37, - 40, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 43, - 49, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 56, - 59, - ], - "type": "Identifier", - "value": "bax", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 62, - 68, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 75, - 78, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 82, - 88, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "range": Array [ - 95, - 98, - ], - "type": "Identifier", - "value": "eee", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 100, - 106, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 109, - 115, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 25, - "line": 6, - }, - }, - "range": Array [ - 115, - 116, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 121, - 124, - ], - "type": "Identifier", - "value": "doo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "range": Array [ - 126, - 127, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 128, - 132, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 7, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 138, - 141, - ], - "type": "Identifier", - "value": "coo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "range": Array [ - 141, - 142, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 142, - 143, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "range": Array [ - 143, - 144, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "range": Array [ - 144, - 145, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 8, - }, - "start": Object { - "column": 12, - "line": 8, - }, - }, - "range": Array [ - 146, - 147, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 13, - "line": 8, - }, - }, - "range": Array [ - 147, - 148, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "range": Array [ - 149, - 150, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 8, - }, - "start": Object { - "column": 16, - "line": 8, - }, - }, - "range": Array [ - 150, - 151, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 8, - }, - "start": Object { - "column": 17, - "line": 8, - }, - }, - "range": Array [ - 151, - 152, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 19, - "line": 8, - }, - }, - "range": Array [ - 153, - 157, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 8, - }, - "start": Object { - "column": 23, - "line": 8, - }, - }, - "range": Array [ - 157, - 158, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 163, - 164, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "range": Array [ - 164, - 167, - ], - "type": "Identifier", - "value": "loo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "range": Array [ - 167, - 168, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 9, - "line": 9, - }, - }, - "range": Array [ - 168, - 169, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 9, - }, - "start": Object { - "column": 10, - "line": 9, - }, - }, - "range": Array [ - 169, - 170, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 170, - 171, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "range": Array [ - 171, - 172, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 9, - }, - "start": Object { - "column": 14, - "line": 9, - }, - }, - "range": Array [ - 173, - 174, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 15, - "line": 9, - }, - }, - "range": Array [ - 174, - 175, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "range": Array [ - 176, - 177, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 18, - "line": 9, - }, - }, - "range": Array [ - 177, - 178, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "range": Array [ - 178, - 179, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 9, - }, - "start": Object { - "column": 21, - "line": 9, - }, - }, - "range": Array [ - 180, - 184, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 9, - }, - "start": Object { - "column": 25, - "line": 9, - }, - }, - "range": Array [ - 184, - 185, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "range": Array [ - 190, - 193, - ], - "type": "Identifier", - "value": "boo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 10, - }, - "start": Object { - "column": 7, - "line": 10, - }, - }, - "range": Array [ - 193, - 194, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "range": Array [ - 194, - 195, - ], - "type": "Identifier", - "value": "J", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 10, - }, - "start": Object { - "column": 9, - "line": 10, - }, - }, - "range": Array [ - 195, - 196, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 10, - }, - "start": Object { - "column": 10, - "line": 10, - }, - }, - "range": Array [ - 196, - 197, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 10, - }, - "start": Object { - "column": 11, - "line": 10, - }, - }, - "range": Array [ - 197, - 198, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 10, - }, - "start": Object { - "column": 12, - "line": 10, - }, - }, - "range": Array [ - 198, - 199, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 14, - "line": 10, - }, - }, - "range": Array [ - 200, - 201, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 10, - }, - "start": Object { - "column": 15, - "line": 10, - }, - }, - "range": Array [ - 201, - 202, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 10, - }, - "start": Object { - "column": 17, - "line": 10, - }, - }, - "range": Array [ - 203, - 204, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 10, - }, - "start": Object { - "column": 18, - "line": 10, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 10, - }, - "start": Object { - "column": 19, - "line": 10, - }, - }, - "range": Array [ - 205, - 206, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 10, - }, - "start": Object { - "column": 21, - "line": 10, - }, - }, - "range": Array [ - 207, - 211, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 10, - }, - "start": Object { - "column": 25, - "line": 10, - }, - }, - "range": Array [ - 211, - 212, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "range": Array [ - 217, - 220, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 11, - }, - "start": Object { - "column": 8, - "line": 11, - }, - }, - "range": Array [ - 221, - 222, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 11, - }, - "start": Object { - "column": 9, - "line": 11, - }, - }, - "range": Array [ - 222, - 223, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 11, - }, - "start": Object { - "column": 10, - "line": 11, - }, - }, - "range": Array [ - 223, - 224, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 11, - }, - "start": Object { - "column": 12, - "line": 11, - }, - }, - "range": Array [ - 225, - 226, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 11, - }, - "start": Object { - "column": 13, - "line": 11, - }, - }, - "range": Array [ - 226, - 227, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 11, - }, - "start": Object { - "column": 14, - "line": 11, - }, - }, - "range": Array [ - 227, - 228, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 11, - }, - "start": Object { - "column": 15, - "line": 11, - }, - }, - "range": Array [ - 228, - 229, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 11, - }, - "start": Object { - "column": 17, - "line": 11, - }, - }, - "range": Array [ - 230, - 236, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 11, - }, - "start": Object { - "column": 23, - "line": 11, - }, - }, - "range": Array [ - 236, - 237, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 12, - }, - "start": Object { - "column": 4, - "line": 12, - }, - }, - "range": Array [ - 242, - 245, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "range": Array [ - 246, - 247, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 12, - }, - }, - "range": Array [ - 247, - 248, - ], - "type": "Identifier", - "value": "F", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 12, - }, - "start": Object { - "column": 10, - "line": 12, - }, - }, - "range": Array [ - 248, - 249, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 12, - }, - "start": Object { - "column": 11, - "line": 12, - }, - }, - "range": Array [ - 249, - 250, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 12, - "line": 12, - }, - }, - "range": Array [ - 250, - 251, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 12, - }, - "start": Object { - "column": 13, - "line": 12, - }, - }, - "range": Array [ - 251, - 252, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 12, - }, - "start": Object { - "column": 15, - "line": 12, - }, - }, - "range": Array [ - 253, - 254, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 12, - }, - "start": Object { - "column": 16, - "line": 12, - }, - }, - "range": Array [ - 254, - 255, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 12, - }, - "start": Object { - "column": 17, - "line": 12, - }, - }, - "range": Array [ - 255, - 256, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 12, - }, - "start": Object { - "column": 18, - "line": 12, - }, - }, - "range": Array [ - 256, - 257, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 12, - }, - "start": Object { - "column": 20, - "line": 12, - }, - }, - "range": Array [ - 258, - 264, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 12, - }, - "start": Object { - "column": 26, - "line": 12, - }, - }, - "range": Array [ - 264, - 265, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 13, - }, - }, - "range": Array [ - 266, - 267, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot deleted file mode 100644 index c6e9757b2fae..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot +++ /dev/null @@ -1,430 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-with-construct-signature-with-parameter-accessibility.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "params": Array [ - Object { - "accessibility": "public", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 26, - 34, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "private", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 44, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 36, - 45, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 21, - 47, - ], - "returnType": undefined, - "type": "TSConstructSignatureDeclaration", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 49, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Test", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "Test", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 36, - 43, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-extends-member-expression.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-extends-member-expression.src.ts.shot deleted file mode 100644 index 1ee22831720f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-extends-member-expression.src.ts.shot +++ /dev/null @@ -1,310 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-with-extends-member-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [ - Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 22, - 29, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 29, - ], - "type": "TSInterfaceHeritage", - "typeParameters": undefined, - }, - ], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-extends-type-parameters.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-extends-type-parameters.src.ts.shot deleted file mode 100644 index e0e55ee39453..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-extends-type-parameters.src.ts.shot +++ /dev/null @@ -1,459 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-with-extends-type-parameters.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 36, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "TSInterfaceHeritage", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "J", - "optional": false, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 28, - 31, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 14, - 15, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 13, - 16, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 24, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "value": "J", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-generic.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-generic.src.ts.shot deleted file mode 100644 index bb5079d781d7..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-generic.src.ts.shot +++ /dev/null @@ -1,272 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-with-generic.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Test", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 15, - 16, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 14, - 17, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "Test", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-jsdoc.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-jsdoc.src.ts.shot deleted file mode 100644 index 7a4cb6b571d7..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-jsdoc.src.ts.shot +++ /dev/null @@ -1,341 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-with-jsdoc.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 76, - 79, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 80, - 83, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 76, - 85, - ], - "readonly": false, - "returnType": undefined, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 87, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Test", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 87, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 71, - ], - "type": "Block", - "value": "* - * Comment Line 1 - * @baz bar - ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 88, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "Test", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 76, - 79, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 80, - 83, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-method.src.ts.shot deleted file mode 100644 index e82eb8b7cb61..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-method.src.ts.shot +++ /dev/null @@ -1,913 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-with-method.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "h", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 21, - 32, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 24, - 32, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 19, - 40, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 33, - 39, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 35, - 39, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "g", - "optional": false, - "range": Array [ - 43, - 44, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 48, - 54, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 51, - 54, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 43, - 59, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 55, - 58, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 57, - 58, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 45, - 46, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 44, - 47, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 61, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 61, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 62, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "h", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 35, - 39, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Identifier", - "value": "g", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 48, - 51, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-optional-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-optional-properties.src.ts.shot deleted file mode 100644 index 1a1c822d9b41..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-optional-properties.src.ts.shot +++ /dev/null @@ -1,825 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-with-optional-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": true, - "range": Array [ - 21, - 26, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": undefined, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "optional": true, - "range": Array [ - 31, - 44, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 35, - 43, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 37, - 43, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 49, - 52, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 34, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "optional": true, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 54, - 57, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "name": "bar", - "optional": true, - "range": Array [ - 59, - 71, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 63, - 71, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 4, - }, - }, - "range": Array [ - 65, - 71, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "name": "baz", - "optional": true, - "range": Array [ - 73, - 77, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 49, - 79, - ], - "readonly": false, - "returnType": undefined, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 81, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 81, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 82, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 37, - 43, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 49, - 52, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 54, - 57, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 59, - 62, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 4, - }, - }, - "range": Array [ - 65, - 71, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 31, - "line": 4, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 4, - }, - "start": Object { - "column": 32, - "line": 4, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 4, - }, - "start": Object { - "column": 33, - "line": 4, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-without-type-annotation.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-without-type-annotation.src.ts.shot deleted file mode 100644 index 81c669ee9db8..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-without-type-annotation.src.ts.shot +++ /dev/null @@ -1,241 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics interface-without-type-annotation.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 21, - 25, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 27, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/intrinsic-keyword.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/intrinsic-keyword.src.ts.shot deleted file mode 100644 index 039aea820b30..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/intrinsic-keyword.src.ts.shot +++ /dev/null @@ -1,1279 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics intrinsic-keyword.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Uppercase", - "optional": false, - "range": Array [ - 5, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 44, - ], - "type": "TSIntrinsicKeyword", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "TSStringKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "S", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 15, - 31, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 14, - 32, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Lowercase", - "optional": false, - "range": Array [ - 51, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 46, - 91, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 81, - 90, - ], - "type": "TSIntrinsicKeyword", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 71, - 77, - ], - "type": "TSStringKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "name": "S", - "optional": false, - "range": Array [ - 61, - 62, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 61, - 77, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 60, - 78, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "Capitalize", - "optional": false, - "range": Array [ - 97, - 107, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 92, - 138, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 128, - 137, - ], - "type": "TSIntrinsicKeyword", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 118, - 124, - ], - "type": "TSStringKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "name": "S", - "optional": false, - "range": Array [ - 108, - 109, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 108, - 124, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 107, - 125, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "name": "Uncapitalize", - "optional": false, - "range": Array [ - 144, - 156, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 48, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 139, - 187, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 4, - }, - "start": Object { - "column": 38, - "line": 4, - }, - }, - "range": Array [ - 177, - 186, - ], - "type": "TSIntrinsicKeyword", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 167, - 173, - ], - "type": "TSStringKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 34, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "name": "S", - "optional": false, - "range": Array [ - 157, - 158, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 157, - 173, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 156, - 174, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 188, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 14, - ], - "type": "Identifier", - "value": "Uppercase", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "S", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 24, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 44, - ], - "type": "Identifier", - "value": "intrinsic", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 46, - 50, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 51, - 60, - ], - "type": "Identifier", - "value": "Lowercase", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Identifier", - "value": "S", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 63, - 70, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 71, - 77, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 81, - 90, - ], - "type": "Identifier", - "value": "intrinsic", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 92, - 96, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 97, - 107, - ], - "type": "Identifier", - "value": "Capitalize", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Identifier", - "value": "S", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 110, - 117, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 118, - 124, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 32, - "line": 3, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 3, - }, - "start": Object { - "column": 34, - "line": 3, - }, - }, - "range": Array [ - 126, - 127, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 128, - 137, - ], - "type": "Identifier", - "value": "intrinsic", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 45, - "line": 3, - }, - }, - "range": Array [ - 137, - 138, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 139, - 143, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 144, - 156, - ], - "type": "Identifier", - "value": "Uncapitalize", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 156, - 157, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 157, - 158, - ], - "type": "Identifier", - "value": "S", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 4, - }, - }, - "range": Array [ - 159, - 166, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 167, - 173, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 34, - "line": 4, - }, - }, - "range": Array [ - 173, - 174, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 36, - "line": 4, - }, - }, - "range": Array [ - 175, - 176, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 4, - }, - "start": Object { - "column": 38, - "line": 4, - }, - }, - "range": Array [ - 177, - 186, - ], - "type": "Identifier", - "value": "intrinsic", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 4, - }, - "start": Object { - "column": 47, - "line": 4, - }, - }, - "range": Array [ - 186, - 187, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/keyof-operator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/keyof-operator.src.ts.shot deleted file mode 100644 index 6f229cb965a7..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/keyof-operator.src.ts.shot +++ /dev/null @@ -1,232 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics keyof-operator.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "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 { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Identifier", - "value": "keyof", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/keyword-variables.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/keyword-variables.src.ts.shot deleted file mode 100644 index fddca0c561dc..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/keyword-variables.src.ts.shot +++ /dev/null @@ -1,9764 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics keyword-variables.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "abstract", - "optional": false, - "range": Array [ - 10, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 10, - 22, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 4, - 23, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "as", - "optional": false, - "range": Array [ - 32, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 37, - 38, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 26, - 39, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "name": "asserts", - "optional": false, - "range": Array [ - 48, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 58, - 59, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 48, - 59, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 42, - 60, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "name": "any", - "optional": false, - "range": Array [ - 69, - 72, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 75, - 76, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 69, - 76, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 63, - 77, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "name": "async", - "optional": false, - "range": Array [ - 86, - 91, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 94, - 95, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 86, - 95, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 80, - 96, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "name": "await", - "optional": false, - "range": Array [ - 105, - 110, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 7, - }, - }, - "range": Array [ - 113, - 114, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 105, - 114, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 99, - 115, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "name": "boolean", - "optional": false, - "range": Array [ - 124, - 131, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 8, - }, - "start": Object { - "column": 18, - "line": 8, - }, - }, - "range": Array [ - 134, - 135, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 124, - 135, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 20, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 118, - 136, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 145, - 156, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 9, - }, - "start": Object { - "column": 22, - "line": 9, - }, - }, - "range": Array [ - 159, - 160, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "range": Array [ - 145, - 160, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 24, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 139, - 161, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "name": "declare", - "optional": false, - "range": Array [ - 170, - 177, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 10, - }, - "start": Object { - "column": 18, - "line": 10, - }, - }, - "range": Array [ - 180, - 181, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "range": Array [ - 170, - 181, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 20, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 164, - 182, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 11, - }, - "start": Object { - "column": 8, - "line": 11, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 191, - 194, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 11, - }, - "start": Object { - "column": 14, - "line": 11, - }, - }, - "range": Array [ - 197, - 198, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 11, - }, - "start": Object { - "column": 8, - "line": 11, - }, - }, - "range": Array [ - 191, - 198, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 16, - "line": 11, - }, - "start": Object { - "column": 2, - "line": 11, - }, - }, - "range": Array [ - 185, - 199, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "name": "infer", - "optional": false, - "range": Array [ - 208, - 213, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 12, - }, - "start": Object { - "column": 16, - "line": 12, - }, - }, - "range": Array [ - 216, - 217, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "range": Array [ - 208, - 217, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 18, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "range": Array [ - 202, - 218, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "name": "is", - "optional": false, - "range": Array [ - 227, - 229, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 13, - }, - "start": Object { - "column": 13, - "line": 13, - }, - }, - "range": Array [ - 232, - 233, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "range": Array [ - 227, - 233, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 15, - "line": 13, - }, - "start": Object { - "column": 2, - "line": 13, - }, - }, - "range": Array [ - 221, - 234, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 14, - }, - "start": Object { - "column": 8, - "line": 14, - }, - }, - "name": "keyof", - "optional": false, - "range": Array [ - 243, - 248, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 14, - }, - "start": Object { - "column": 16, - "line": 14, - }, - }, - "range": Array [ - 251, - 252, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 14, - }, - "start": Object { - "column": 8, - "line": 14, - }, - }, - "range": Array [ - 243, - 252, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 18, - "line": 14, - }, - "start": Object { - "column": 2, - "line": 14, - }, - }, - "range": Array [ - 237, - 253, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 15, - }, - "start": Object { - "column": 8, - "line": 15, - }, - }, - "name": "module", - "optional": false, - "range": Array [ - 262, - 268, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 15, - }, - "start": Object { - "column": 17, - "line": 15, - }, - }, - "range": Array [ - 271, - 272, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 15, - }, - "start": Object { - "column": 8, - "line": 15, - }, - }, - "range": Array [ - 262, - 272, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 19, - "line": 15, - }, - "start": Object { - "column": 2, - "line": 15, - }, - }, - "range": Array [ - 256, - 273, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 16, - }, - "start": Object { - "column": 8, - "line": 16, - }, - }, - "name": "namespace", - "optional": false, - "range": Array [ - 282, - 291, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 16, - }, - "start": Object { - "column": 20, - "line": 16, - }, - }, - "range": Array [ - 294, - 295, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 16, - }, - "start": Object { - "column": 8, - "line": 16, - }, - }, - "range": Array [ - 282, - 295, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 22, - "line": 16, - }, - "start": Object { - "column": 2, - "line": 16, - }, - }, - "range": Array [ - 276, - 296, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 17, - }, - "start": Object { - "column": 8, - "line": 17, - }, - }, - "name": "never", - "optional": false, - "range": Array [ - 305, - 310, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 17, - }, - "start": Object { - "column": 16, - "line": 17, - }, - }, - "range": Array [ - 313, - 314, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 17, - }, - "start": Object { - "column": 8, - "line": 17, - }, - }, - "range": Array [ - 305, - 314, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 18, - "line": 17, - }, - "start": Object { - "column": 2, - "line": 17, - }, - }, - "range": Array [ - 299, - 315, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 18, - }, - "start": Object { - "column": 8, - "line": 18, - }, - }, - "name": "readonly", - "optional": false, - "range": Array [ - 324, - 332, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 18, - }, - "start": Object { - "column": 19, - "line": 18, - }, - }, - "range": Array [ - 335, - 336, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 18, - }, - "start": Object { - "column": 8, - "line": 18, - }, - }, - "range": Array [ - 324, - 336, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 21, - "line": 18, - }, - "start": Object { - "column": 2, - "line": 18, - }, - }, - "range": Array [ - 318, - 337, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 19, - }, - "start": Object { - "column": 8, - "line": 19, - }, - }, - "name": "require", - "optional": false, - "range": Array [ - 346, - 353, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 19, - }, - "start": Object { - "column": 18, - "line": 19, - }, - }, - "range": Array [ - 356, - 357, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 19, - }, - "start": Object { - "column": 8, - "line": 19, - }, - }, - "range": Array [ - 346, - 357, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 20, - "line": 19, - }, - "start": Object { - "column": 2, - "line": 19, - }, - }, - "range": Array [ - 340, - 358, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 20, - }, - "start": Object { - "column": 8, - "line": 20, - }, - }, - "name": "number", - "optional": false, - "range": Array [ - 367, - 373, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 20, - }, - "start": Object { - "column": 17, - "line": 20, - }, - }, - "range": Array [ - 376, - 377, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 20, - }, - "start": Object { - "column": 8, - "line": 20, - }, - }, - "range": Array [ - 367, - 377, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 19, - "line": 20, - }, - "start": Object { - "column": 2, - "line": 20, - }, - }, - "range": Array [ - 361, - 378, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 21, - }, - "start": Object { - "column": 8, - "line": 21, - }, - }, - "name": "object", - "optional": false, - "range": Array [ - 387, - 393, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 21, - }, - "start": Object { - "column": 17, - "line": 21, - }, - }, - "range": Array [ - 396, - 397, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 21, - }, - "start": Object { - "column": 8, - "line": 21, - }, - }, - "range": Array [ - 387, - 397, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 19, - "line": 21, - }, - "start": Object { - "column": 2, - "line": 21, - }, - }, - "range": Array [ - 381, - 398, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 22, - }, - "start": Object { - "column": 8, - "line": 22, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 407, - 410, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 22, - }, - "start": Object { - "column": 14, - "line": 22, - }, - }, - "range": Array [ - 413, - 414, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 22, - }, - "start": Object { - "column": 8, - "line": 22, - }, - }, - "range": Array [ - 407, - 414, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 16, - "line": 22, - }, - "start": Object { - "column": 2, - "line": 22, - }, - }, - "range": Array [ - 401, - 415, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 23, - }, - "start": Object { - "column": 8, - "line": 23, - }, - }, - "name": "string", - "optional": false, - "range": Array [ - 424, - 430, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 23, - }, - "start": Object { - "column": 17, - "line": 23, - }, - }, - "range": Array [ - 433, - 434, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 23, - }, - "start": Object { - "column": 8, - "line": 23, - }, - }, - "range": Array [ - 424, - 434, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 19, - "line": 23, - }, - "start": Object { - "column": 2, - "line": 23, - }, - }, - "range": Array [ - 418, - 435, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 24, - }, - "start": Object { - "column": 8, - "line": 24, - }, - }, - "name": "symbol", - "optional": false, - "range": Array [ - 444, - 450, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 24, - }, - "start": Object { - "column": 17, - "line": 24, - }, - }, - "range": Array [ - 453, - 454, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 24, - }, - "start": Object { - "column": 8, - "line": 24, - }, - }, - "range": Array [ - 444, - 454, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 19, - "line": 24, - }, - "start": Object { - "column": 2, - "line": 24, - }, - }, - "range": Array [ - 438, - 455, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 25, - }, - "start": Object { - "column": 8, - "line": 25, - }, - }, - "name": "type", - "optional": false, - "range": Array [ - 464, - 468, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 25, - }, - "start": Object { - "column": 15, - "line": 25, - }, - }, - "range": Array [ - 471, - 472, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 25, - }, - "start": Object { - "column": 8, - "line": 25, - }, - }, - "range": Array [ - 464, - 472, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 17, - "line": 25, - }, - "start": Object { - "column": 2, - "line": 25, - }, - }, - "range": Array [ - 458, - 473, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 26, - }, - "start": Object { - "column": 8, - "line": 26, - }, - }, - "name": "undefined", - "optional": false, - "range": Array [ - 482, - 491, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 26, - }, - "start": Object { - "column": 20, - "line": 26, - }, - }, - "range": Array [ - 494, - 495, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 26, - }, - "start": Object { - "column": 8, - "line": 26, - }, - }, - "range": Array [ - 482, - 495, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 22, - "line": 26, - }, - "start": Object { - "column": 2, - "line": 26, - }, - }, - "range": Array [ - 476, - 496, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 27, - }, - "start": Object { - "column": 8, - "line": 27, - }, - }, - "name": "unique", - "optional": false, - "range": Array [ - 505, - 511, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 27, - }, - "start": Object { - "column": 17, - "line": 27, - }, - }, - "range": Array [ - 514, - 515, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 27, - }, - "start": Object { - "column": 8, - "line": 27, - }, - }, - "range": Array [ - 505, - 515, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 19, - "line": 27, - }, - "start": Object { - "column": 2, - "line": 27, - }, - }, - "range": Array [ - 499, - 516, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 28, - }, - "start": Object { - "column": 8, - "line": 28, - }, - }, - "name": "unknown", - "optional": false, - "range": Array [ - 525, - 532, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 28, - }, - "start": Object { - "column": 18, - "line": 28, - }, - }, - "range": Array [ - 535, - 536, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 28, - }, - "start": Object { - "column": 8, - "line": 28, - }, - }, - "range": Array [ - 525, - 536, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 20, - "line": 28, - }, - "start": Object { - "column": 2, - "line": 28, - }, - }, - "range": Array [ - 519, - 537, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 29, - }, - "start": Object { - "column": 8, - "line": 29, - }, - }, - "name": "from", - "optional": false, - "range": Array [ - 546, - 550, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 29, - }, - "start": Object { - "column": 15, - "line": 29, - }, - }, - "range": Array [ - 553, - 554, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 29, - }, - "start": Object { - "column": 8, - "line": 29, - }, - }, - "range": Array [ - 546, - 554, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 17, - "line": 29, - }, - "start": Object { - "column": 2, - "line": 29, - }, - }, - "range": Array [ - 540, - 555, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 30, - }, - "start": Object { - "column": 8, - "line": 30, - }, - }, - "name": "global", - "optional": false, - "range": Array [ - 564, - 570, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 30, - }, - "start": Object { - "column": 17, - "line": 30, - }, - }, - "range": Array [ - 573, - 574, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 30, - }, - "start": Object { - "column": 8, - "line": 30, - }, - }, - "range": Array [ - 564, - 574, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 19, - "line": 30, - }, - "start": Object { - "column": 2, - "line": 30, - }, - }, - "range": Array [ - 558, - 575, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 31, - }, - "start": Object { - "column": 8, - "line": 31, - }, - }, - "name": "bigint", - "optional": false, - "range": Array [ - 584, - 590, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 31, - }, - "start": Object { - "column": 17, - "line": 31, - }, - }, - "range": Array [ - 593, - 594, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 31, - }, - "start": Object { - "column": 8, - "line": 31, - }, - }, - "range": Array [ - 584, - 594, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 19, - "line": 31, - }, - "start": Object { - "column": 2, - "line": 31, - }, - }, - "range": Array [ - 578, - 595, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 32, - }, - "start": Object { - "column": 8, - "line": 32, - }, - }, - "name": "of", - "optional": false, - "range": Array [ - 604, - 606, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 32, - }, - "start": Object { - "column": 13, - "line": 32, - }, - }, - "range": Array [ - 609, - 610, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 32, - }, - "start": Object { - "column": 8, - "line": 32, - }, - }, - "range": Array [ - 604, - 610, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 15, - "line": 32, - }, - "start": Object { - "column": 2, - "line": 32, - }, - }, - "range": Array [ - 598, - 611, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 33, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 613, - ], - "type": "BlockStatement", - }, - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 21, - "line": 67, - }, - "start": Object { - "column": 0, - "line": 35, - }, - }, - "range": Array [ - 615, - 945, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 67, - }, - "start": Object { - "column": 7, - "line": 67, - }, - }, - "range": Array [ - 931, - 944, - ], - "raw": "'fake-module'", - "type": "Literal", - "value": "fake-module", - }, - "specifiers": Array [ - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 36, - }, - "start": Object { - "column": 2, - "line": 36, - }, - }, - "name": "abstract", - "optional": false, - "range": Array [ - 626, - 634, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 36, - }, - "start": Object { - "column": 2, - "line": 36, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 36, - }, - "start": Object { - "column": 2, - "line": 36, - }, - }, - "name": "abstract", - "optional": false, - "range": Array [ - 626, - 634, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 626, - 634, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 37, - }, - "start": Object { - "column": 2, - "line": 37, - }, - }, - "name": "as", - "optional": false, - "range": Array [ - 638, - 640, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 37, - }, - "start": Object { - "column": 2, - "line": 37, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 37, - }, - "start": Object { - "column": 2, - "line": 37, - }, - }, - "name": "as", - "optional": false, - "range": Array [ - 638, - 640, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 638, - 640, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 38, - }, - "start": Object { - "column": 2, - "line": 38, - }, - }, - "name": "asserts", - "optional": false, - "range": Array [ - 644, - 651, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 38, - }, - "start": Object { - "column": 2, - "line": 38, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 38, - }, - "start": Object { - "column": 2, - "line": 38, - }, - }, - "name": "asserts", - "optional": false, - "range": Array [ - 644, - 651, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 644, - 651, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 39, - }, - "start": Object { - "column": 2, - "line": 39, - }, - }, - "name": "any", - "optional": false, - "range": Array [ - 655, - 658, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 39, - }, - "start": Object { - "column": 2, - "line": 39, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 39, - }, - "start": Object { - "column": 2, - "line": 39, - }, - }, - "name": "any", - "optional": false, - "range": Array [ - 655, - 658, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 655, - 658, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 40, - }, - "start": Object { - "column": 2, - "line": 40, - }, - }, - "name": "async", - "optional": false, - "range": Array [ - 662, - 667, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 40, - }, - "start": Object { - "column": 2, - "line": 40, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 40, - }, - "start": Object { - "column": 2, - "line": 40, - }, - }, - "name": "async", - "optional": false, - "range": Array [ - 662, - 667, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 662, - 667, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 41, - }, - "start": Object { - "column": 2, - "line": 41, - }, - }, - "name": "await", - "optional": false, - "range": Array [ - 671, - 676, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 41, - }, - "start": Object { - "column": 2, - "line": 41, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 41, - }, - "start": Object { - "column": 2, - "line": 41, - }, - }, - "name": "await", - "optional": false, - "range": Array [ - 671, - 676, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 671, - 676, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 42, - }, - "start": Object { - "column": 2, - "line": 42, - }, - }, - "name": "boolean", - "optional": false, - "range": Array [ - 680, - 687, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 42, - }, - "start": Object { - "column": 2, - "line": 42, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 42, - }, - "start": Object { - "column": 2, - "line": 42, - }, - }, - "name": "boolean", - "optional": false, - "range": Array [ - 680, - 687, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 680, - 687, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 43, - }, - "start": Object { - "column": 2, - "line": 43, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 691, - 702, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 43, - }, - "start": Object { - "column": 2, - "line": 43, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 43, - }, - "start": Object { - "column": 2, - "line": 43, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 691, - 702, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 691, - 702, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 44, - }, - "start": Object { - "column": 2, - "line": 44, - }, - }, - "name": "declare", - "optional": false, - "range": Array [ - 706, - 713, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 44, - }, - "start": Object { - "column": 2, - "line": 44, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 44, - }, - "start": Object { - "column": 2, - "line": 44, - }, - }, - "name": "declare", - "optional": false, - "range": Array [ - 706, - 713, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 706, - 713, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 45, - }, - "start": Object { - "column": 2, - "line": 45, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 717, - 720, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 45, - }, - "start": Object { - "column": 2, - "line": 45, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 45, - }, - "start": Object { - "column": 2, - "line": 45, - }, - }, - "name": "get", - "optional": false, - "range": Array [ - 717, - 720, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 717, - 720, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 46, - }, - "start": Object { - "column": 2, - "line": 46, - }, - }, - "name": "infer", - "optional": false, - "range": Array [ - 724, - 729, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 46, - }, - "start": Object { - "column": 2, - "line": 46, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 46, - }, - "start": Object { - "column": 2, - "line": 46, - }, - }, - "name": "infer", - "optional": false, - "range": Array [ - 724, - 729, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 724, - 729, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 47, - }, - "start": Object { - "column": 2, - "line": 47, - }, - }, - "name": "is", - "optional": false, - "range": Array [ - 733, - 735, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 47, - }, - "start": Object { - "column": 2, - "line": 47, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 47, - }, - "start": Object { - "column": 2, - "line": 47, - }, - }, - "name": "is", - "optional": false, - "range": Array [ - 733, - 735, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 733, - 735, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 48, - }, - "start": Object { - "column": 2, - "line": 48, - }, - }, - "name": "keyof", - "optional": false, - "range": Array [ - 739, - 744, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 48, - }, - "start": Object { - "column": 2, - "line": 48, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 48, - }, - "start": Object { - "column": 2, - "line": 48, - }, - }, - "name": "keyof", - "optional": false, - "range": Array [ - 739, - 744, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 739, - 744, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 49, - }, - "start": Object { - "column": 2, - "line": 49, - }, - }, - "name": "module", - "optional": false, - "range": Array [ - 748, - 754, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 49, - }, - "start": Object { - "column": 2, - "line": 49, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 49, - }, - "start": Object { - "column": 2, - "line": 49, - }, - }, - "name": "module", - "optional": false, - "range": Array [ - 748, - 754, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 748, - 754, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 50, - }, - "start": Object { - "column": 2, - "line": 50, - }, - }, - "name": "namespace", - "optional": false, - "range": Array [ - 758, - 767, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 50, - }, - "start": Object { - "column": 2, - "line": 50, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 50, - }, - "start": Object { - "column": 2, - "line": 50, - }, - }, - "name": "namespace", - "optional": false, - "range": Array [ - 758, - 767, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 758, - 767, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 51, - }, - "start": Object { - "column": 2, - "line": 51, - }, - }, - "name": "never", - "optional": false, - "range": Array [ - 771, - 776, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 51, - }, - "start": Object { - "column": 2, - "line": 51, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 51, - }, - "start": Object { - "column": 2, - "line": 51, - }, - }, - "name": "never", - "optional": false, - "range": Array [ - 771, - 776, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 771, - 776, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 52, - }, - "start": Object { - "column": 2, - "line": 52, - }, - }, - "name": "readonly", - "optional": false, - "range": Array [ - 780, - 788, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 52, - }, - "start": Object { - "column": 2, - "line": 52, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 52, - }, - "start": Object { - "column": 2, - "line": 52, - }, - }, - "name": "readonly", - "optional": false, - "range": Array [ - 780, - 788, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 780, - 788, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 53, - }, - "start": Object { - "column": 2, - "line": 53, - }, - }, - "name": "require", - "optional": false, - "range": Array [ - 792, - 799, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 53, - }, - "start": Object { - "column": 2, - "line": 53, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 53, - }, - "start": Object { - "column": 2, - "line": 53, - }, - }, - "name": "require", - "optional": false, - "range": Array [ - 792, - 799, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 792, - 799, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 54, - }, - "start": Object { - "column": 2, - "line": 54, - }, - }, - "name": "number", - "optional": false, - "range": Array [ - 803, - 809, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 54, - }, - "start": Object { - "column": 2, - "line": 54, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 54, - }, - "start": Object { - "column": 2, - "line": 54, - }, - }, - "name": "number", - "optional": false, - "range": Array [ - 803, - 809, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 803, - 809, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 55, - }, - "start": Object { - "column": 2, - "line": 55, - }, - }, - "name": "object", - "optional": false, - "range": Array [ - 813, - 819, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 55, - }, - "start": Object { - "column": 2, - "line": 55, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 55, - }, - "start": Object { - "column": 2, - "line": 55, - }, - }, - "name": "object", - "optional": false, - "range": Array [ - 813, - 819, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 813, - 819, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 56, - }, - "start": Object { - "column": 2, - "line": 56, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 823, - 826, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 56, - }, - "start": Object { - "column": 2, - "line": 56, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 56, - }, - "start": Object { - "column": 2, - "line": 56, - }, - }, - "name": "set", - "optional": false, - "range": Array [ - 823, - 826, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 823, - 826, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 57, - }, - "start": Object { - "column": 2, - "line": 57, - }, - }, - "name": "string", - "optional": false, - "range": Array [ - 830, - 836, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 57, - }, - "start": Object { - "column": 2, - "line": 57, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 57, - }, - "start": Object { - "column": 2, - "line": 57, - }, - }, - "name": "string", - "optional": false, - "range": Array [ - 830, - 836, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 830, - 836, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 58, - }, - "start": Object { - "column": 2, - "line": 58, - }, - }, - "name": "symbol", - "optional": false, - "range": Array [ - 840, - 846, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 58, - }, - "start": Object { - "column": 2, - "line": 58, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 58, - }, - "start": Object { - "column": 2, - "line": 58, - }, - }, - "name": "symbol", - "optional": false, - "range": Array [ - 840, - 846, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 840, - 846, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 59, - }, - "start": Object { - "column": 2, - "line": 59, - }, - }, - "name": "type", - "optional": false, - "range": Array [ - 850, - 854, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 59, - }, - "start": Object { - "column": 2, - "line": 59, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 59, - }, - "start": Object { - "column": 2, - "line": 59, - }, - }, - "name": "type", - "optional": false, - "range": Array [ - 850, - 854, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 850, - 854, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 60, - }, - "start": Object { - "column": 2, - "line": 60, - }, - }, - "name": "undefined", - "optional": false, - "range": Array [ - 858, - 867, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 60, - }, - "start": Object { - "column": 2, - "line": 60, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 60, - }, - "start": Object { - "column": 2, - "line": 60, - }, - }, - "name": "undefined", - "optional": false, - "range": Array [ - 858, - 867, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 858, - 867, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 61, - }, - "start": Object { - "column": 2, - "line": 61, - }, - }, - "name": "unique", - "optional": false, - "range": Array [ - 871, - 877, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 61, - }, - "start": Object { - "column": 2, - "line": 61, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 61, - }, - "start": Object { - "column": 2, - "line": 61, - }, - }, - "name": "unique", - "optional": false, - "range": Array [ - 871, - 877, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 871, - 877, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 62, - }, - "start": Object { - "column": 2, - "line": 62, - }, - }, - "name": "unknown", - "optional": false, - "range": Array [ - 881, - 888, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 62, - }, - "start": Object { - "column": 2, - "line": 62, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 62, - }, - "start": Object { - "column": 2, - "line": 62, - }, - }, - "name": "unknown", - "optional": false, - "range": Array [ - 881, - 888, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 881, - 888, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 63, - }, - "start": Object { - "column": 2, - "line": 63, - }, - }, - "name": "from", - "optional": false, - "range": Array [ - 892, - 896, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 63, - }, - "start": Object { - "column": 2, - "line": 63, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 63, - }, - "start": Object { - "column": 2, - "line": 63, - }, - }, - "name": "from", - "optional": false, - "range": Array [ - 892, - 896, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 892, - 896, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 64, - }, - "start": Object { - "column": 2, - "line": 64, - }, - }, - "name": "global", - "optional": false, - "range": Array [ - 900, - 906, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 64, - }, - "start": Object { - "column": 2, - "line": 64, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 64, - }, - "start": Object { - "column": 2, - "line": 64, - }, - }, - "name": "global", - "optional": false, - "range": Array [ - 900, - 906, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 900, - 906, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 65, - }, - "start": Object { - "column": 2, - "line": 65, - }, - }, - "name": "bigint", - "optional": false, - "range": Array [ - 910, - 916, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 65, - }, - "start": Object { - "column": 2, - "line": 65, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 65, - }, - "start": Object { - "column": 2, - "line": 65, - }, - }, - "name": "bigint", - "optional": false, - "range": Array [ - 910, - 916, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 910, - 916, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "value", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 66, - }, - "start": Object { - "column": 2, - "line": 66, - }, - }, - "name": "of", - "optional": false, - "range": Array [ - 920, - 922, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 66, - }, - "start": Object { - "column": 2, - "line": 66, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 66, - }, - "start": Object { - "column": 2, - "line": 66, - }, - }, - "name": "of", - "optional": false, - "range": Array [ - 920, - 922, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 920, - 922, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 69, - }, - "start": Object { - "column": 12, - "line": 69, - }, - }, - "range": Array [ - 959, - 961, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 69, - }, - "start": Object { - "column": 10, - "line": 69, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 957, - 958, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 69, - }, - "start": Object { - "column": 0, - "line": 69, - }, - }, - "range": Array [ - 947, - 961, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 71, - }, - "start": Object { - "column": 9, - "line": 71, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 994, - 995, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 15, - "line": 71, - }, - "start": Object { - "column": 2, - "line": 71, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 987, - 1000, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 71, - }, - "start": Object { - "column": 13, - "line": 71, - }, - }, - "range": Array [ - 998, - 1000, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 71, - }, - "start": Object { - "column": 10, - "line": 71, - }, - }, - "params": Array [], - "range": Array [ - 995, - 1000, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": "private", - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 72, - }, - "start": Object { - "column": 10, - "line": 72, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 1011, - 1012, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 16, - "line": 72, - }, - "start": Object { - "column": 2, - "line": 72, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 1003, - 1017, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 72, - }, - "start": Object { - "column": 14, - "line": 72, - }, - }, - "range": Array [ - 1015, - 1017, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 72, - }, - "start": Object { - "column": 11, - "line": 72, - }, - }, - "params": Array [], - "range": Array [ - 1012, - 1017, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": "public", - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 73, - }, - "start": Object { - "column": 9, - "line": 73, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 1027, - 1028, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 15, - "line": 73, - }, - "start": Object { - "column": 2, - "line": 73, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 1020, - 1033, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 73, - }, - "start": Object { - "column": 13, - "line": 73, - }, - }, - "range": Array [ - 1031, - 1033, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 73, - }, - "start": Object { - "column": 10, - "line": 73, - }, - }, - "params": Array [], - "range": Array [ - 1028, - 1033, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": "protected", - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 74, - }, - "start": Object { - "column": 13, - "line": 74, - }, - }, - "name": "d", - "optional": false, - "range": Array [ - 1047, - 1048, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 76, - }, - "start": Object { - "column": 2, - "line": 74, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 1036, - 1075, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 75, - }, - "start": Object { - "column": 8, - "line": 75, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 1061, - 1062, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "argument": null, - "delegate": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 75, - }, - "start": Object { - "column": 12, - "line": 75, - }, - }, - "range": Array [ - 1065, - 1070, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 75, - }, - "start": Object { - "column": 8, - "line": 75, - }, - }, - "range": Array [ - 1061, - 1070, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 18, - "line": 75, - }, - "start": Object { - "column": 4, - "line": 75, - }, - }, - "range": Array [ - 1057, - 1071, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 76, - }, - "start": Object { - "column": 17, - "line": 74, - }, - }, - "range": Array [ - 1051, - 1075, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": true, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 76, - }, - "start": Object { - "column": 14, - "line": 74, - }, - }, - "params": Array [], - "range": Array [ - 1048, - 1075, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 77, - }, - "start": Object { - "column": 21, - "line": 70, - }, - }, - "range": Array [ - 983, - 1077, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 70, - }, - "start": Object { - "column": 6, - "line": 70, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 968, - 969, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 70, - }, - "start": Object { - "column": 19, - "line": 70, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 981, - 982, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 70, - }, - "start": Object { - "column": 19, - "line": 70, - }, - }, - "range": Array [ - 981, - 982, - ], - "type": "TSClassImplements", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 77, - }, - "start": Object { - "column": 0, - "line": 70, - }, - }, - "range": Array [ - 962, - 1077, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 78, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1078, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 4, - 9, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 10, - 18, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 26, - 31, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 32, - 34, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 42, - 47, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 48, - 55, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 63, - 68, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 69, - 72, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 80, - 85, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 86, - 91, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 99, - 104, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 105, - 110, - ], - "type": "Identifier", - "value": "await", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 7, - }, - }, - "range": Array [ - 113, - 114, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 118, - 123, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 124, - 131, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 8, - }, - "start": Object { - "column": 16, - "line": 8, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 8, - }, - "start": Object { - "column": 18, - "line": 8, - }, - }, - "range": Array [ - 134, - 135, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 8, - }, - "start": Object { - "column": 19, - "line": 8, - }, - }, - "range": Array [ - 135, - 136, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 139, - 144, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "range": Array [ - 145, - 156, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 9, - }, - "start": Object { - "column": 20, - "line": 9, - }, - }, - "range": Array [ - 157, - 158, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 9, - }, - "start": Object { - "column": 22, - "line": 9, - }, - }, - "range": Array [ - 159, - 160, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 9, - }, - "start": Object { - "column": 23, - "line": 9, - }, - }, - "range": Array [ - 160, - 161, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 164, - 169, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "range": Array [ - 170, - 177, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 10, - }, - "start": Object { - "column": 16, - "line": 10, - }, - }, - "range": Array [ - 178, - 179, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 10, - }, - "start": Object { - "column": 18, - "line": 10, - }, - }, - "range": Array [ - 180, - 181, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 10, - }, - "start": Object { - "column": 19, - "line": 10, - }, - }, - "range": Array [ - 181, - 182, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 11, - }, - "start": Object { - "column": 2, - "line": 11, - }, - }, - "range": Array [ - 185, - 190, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 11, - }, - "start": Object { - "column": 8, - "line": 11, - }, - }, - "range": Array [ - 191, - 194, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 11, - }, - "start": Object { - "column": 12, - "line": 11, - }, - }, - "range": Array [ - 195, - 196, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 11, - }, - "start": Object { - "column": 14, - "line": 11, - }, - }, - "range": Array [ - 197, - 198, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 11, - }, - "start": Object { - "column": 15, - "line": 11, - }, - }, - "range": Array [ - 198, - 199, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "range": Array [ - 202, - 207, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "range": Array [ - 208, - 213, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 12, - }, - "start": Object { - "column": 14, - "line": 12, - }, - }, - "range": Array [ - 214, - 215, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 12, - }, - "start": Object { - "column": 16, - "line": 12, - }, - }, - "range": Array [ - 216, - 217, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 12, - }, - "start": Object { - "column": 17, - "line": 12, - }, - }, - "range": Array [ - 217, - 218, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 13, - }, - "start": Object { - "column": 2, - "line": 13, - }, - }, - "range": Array [ - 221, - 226, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "range": Array [ - 227, - 229, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 13, - }, - "start": Object { - "column": 11, - "line": 13, - }, - }, - "range": Array [ - 230, - 231, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 13, - }, - "start": Object { - "column": 13, - "line": 13, - }, - }, - "range": Array [ - 232, - 233, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 13, - }, - "start": Object { - "column": 14, - "line": 13, - }, - }, - "range": Array [ - 233, - 234, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 14, - }, - "start": Object { - "column": 2, - "line": 14, - }, - }, - "range": Array [ - 237, - 242, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 14, - }, - "start": Object { - "column": 8, - "line": 14, - }, - }, - "range": Array [ - 243, - 248, - ], - "type": "Identifier", - "value": "keyof", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 14, - }, - "start": Object { - "column": 14, - "line": 14, - }, - }, - "range": Array [ - 249, - 250, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 14, - }, - "start": Object { - "column": 16, - "line": 14, - }, - }, - "range": Array [ - 251, - 252, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 14, - }, - "start": Object { - "column": 17, - "line": 14, - }, - }, - "range": Array [ - 252, - 253, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 15, - }, - "start": Object { - "column": 2, - "line": 15, - }, - }, - "range": Array [ - 256, - 261, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 15, - }, - "start": Object { - "column": 8, - "line": 15, - }, - }, - "range": Array [ - 262, - 268, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 15, - }, - "start": Object { - "column": 15, - "line": 15, - }, - }, - "range": Array [ - 269, - 270, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 15, - }, - "start": Object { - "column": 17, - "line": 15, - }, - }, - "range": Array [ - 271, - 272, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 15, - }, - "start": Object { - "column": 18, - "line": 15, - }, - }, - "range": Array [ - 272, - 273, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 16, - }, - "start": Object { - "column": 2, - "line": 16, - }, - }, - "range": Array [ - 276, - 281, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 16, - }, - "start": Object { - "column": 8, - "line": 16, - }, - }, - "range": Array [ - 282, - 291, - ], - "type": "Identifier", - "value": "namespace", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 16, - }, - "start": Object { - "column": 18, - "line": 16, - }, - }, - "range": Array [ - 292, - 293, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 16, - }, - "start": Object { - "column": 20, - "line": 16, - }, - }, - "range": Array [ - 294, - 295, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 16, - }, - "start": Object { - "column": 21, - "line": 16, - }, - }, - "range": Array [ - 295, - 296, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 17, - }, - "start": Object { - "column": 2, - "line": 17, - }, - }, - "range": Array [ - 299, - 304, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 17, - }, - "start": Object { - "column": 8, - "line": 17, - }, - }, - "range": Array [ - 305, - 310, - ], - "type": "Identifier", - "value": "never", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 17, - }, - "start": Object { - "column": 14, - "line": 17, - }, - }, - "range": Array [ - 311, - 312, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 17, - }, - "start": Object { - "column": 16, - "line": 17, - }, - }, - "range": Array [ - 313, - 314, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 17, - }, - "start": Object { - "column": 17, - "line": 17, - }, - }, - "range": Array [ - 314, - 315, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 18, - }, - "start": Object { - "column": 2, - "line": 18, - }, - }, - "range": Array [ - 318, - 323, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 18, - }, - "start": Object { - "column": 8, - "line": 18, - }, - }, - "range": Array [ - 324, - 332, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 18, - }, - "start": Object { - "column": 17, - "line": 18, - }, - }, - "range": Array [ - 333, - 334, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 18, - }, - "start": Object { - "column": 19, - "line": 18, - }, - }, - "range": Array [ - 335, - 336, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 18, - }, - "start": Object { - "column": 20, - "line": 18, - }, - }, - "range": Array [ - 336, - 337, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 19, - }, - "start": Object { - "column": 2, - "line": 19, - }, - }, - "range": Array [ - 340, - 345, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 19, - }, - "start": Object { - "column": 8, - "line": 19, - }, - }, - "range": Array [ - 346, - 353, - ], - "type": "Identifier", - "value": "require", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 19, - }, - "start": Object { - "column": 16, - "line": 19, - }, - }, - "range": Array [ - 354, - 355, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 19, - }, - "start": Object { - "column": 18, - "line": 19, - }, - }, - "range": Array [ - 356, - 357, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 19, - }, - "start": Object { - "column": 19, - "line": 19, - }, - }, - "range": Array [ - 357, - 358, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 20, - }, - "start": Object { - "column": 2, - "line": 20, - }, - }, - "range": Array [ - 361, - 366, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 20, - }, - "start": Object { - "column": 8, - "line": 20, - }, - }, - "range": Array [ - 367, - 373, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 20, - }, - "start": Object { - "column": 15, - "line": 20, - }, - }, - "range": Array [ - 374, - 375, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 20, - }, - "start": Object { - "column": 17, - "line": 20, - }, - }, - "range": Array [ - 376, - 377, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 20, - }, - "start": Object { - "column": 18, - "line": 20, - }, - }, - "range": Array [ - 377, - 378, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 21, - }, - "start": Object { - "column": 2, - "line": 21, - }, - }, - "range": Array [ - 381, - 386, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 21, - }, - "start": Object { - "column": 8, - "line": 21, - }, - }, - "range": Array [ - 387, - 393, - ], - "type": "Identifier", - "value": "object", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 21, - }, - "start": Object { - "column": 15, - "line": 21, - }, - }, - "range": Array [ - 394, - 395, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 21, - }, - "start": Object { - "column": 17, - "line": 21, - }, - }, - "range": Array [ - 396, - 397, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 21, - }, - "start": Object { - "column": 18, - "line": 21, - }, - }, - "range": Array [ - 397, - 398, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 22, - }, - "start": Object { - "column": 2, - "line": 22, - }, - }, - "range": Array [ - 401, - 406, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 22, - }, - "start": Object { - "column": 8, - "line": 22, - }, - }, - "range": Array [ - 407, - 410, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 22, - }, - "start": Object { - "column": 12, - "line": 22, - }, - }, - "range": Array [ - 411, - 412, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 22, - }, - "start": Object { - "column": 14, - "line": 22, - }, - }, - "range": Array [ - 413, - 414, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 22, - }, - "start": Object { - "column": 15, - "line": 22, - }, - }, - "range": Array [ - 414, - 415, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 23, - }, - "start": Object { - "column": 2, - "line": 23, - }, - }, - "range": Array [ - 418, - 423, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 23, - }, - "start": Object { - "column": 8, - "line": 23, - }, - }, - "range": Array [ - 424, - 430, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 23, - }, - "start": Object { - "column": 15, - "line": 23, - }, - }, - "range": Array [ - 431, - 432, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 23, - }, - "start": Object { - "column": 17, - "line": 23, - }, - }, - "range": Array [ - 433, - 434, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 23, - }, - "start": Object { - "column": 18, - "line": 23, - }, - }, - "range": Array [ - 434, - 435, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 24, - }, - "start": Object { - "column": 2, - "line": 24, - }, - }, - "range": Array [ - 438, - 443, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 24, - }, - "start": Object { - "column": 8, - "line": 24, - }, - }, - "range": Array [ - 444, - 450, - ], - "type": "Identifier", - "value": "symbol", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 24, - }, - "start": Object { - "column": 15, - "line": 24, - }, - }, - "range": Array [ - 451, - 452, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 24, - }, - "start": Object { - "column": 17, - "line": 24, - }, - }, - "range": Array [ - 453, - 454, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 24, - }, - "start": Object { - "column": 18, - "line": 24, - }, - }, - "range": Array [ - 454, - 455, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 25, - }, - "start": Object { - "column": 2, - "line": 25, - }, - }, - "range": Array [ - 458, - 463, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 25, - }, - "start": Object { - "column": 8, - "line": 25, - }, - }, - "range": Array [ - 464, - 468, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 25, - }, - "start": Object { - "column": 13, - "line": 25, - }, - }, - "range": Array [ - 469, - 470, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 25, - }, - "start": Object { - "column": 15, - "line": 25, - }, - }, - "range": Array [ - 471, - 472, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 25, - }, - "start": Object { - "column": 16, - "line": 25, - }, - }, - "range": Array [ - 472, - 473, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 26, - }, - "start": Object { - "column": 2, - "line": 26, - }, - }, - "range": Array [ - 476, - 481, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 26, - }, - "start": Object { - "column": 8, - "line": 26, - }, - }, - "range": Array [ - 482, - 491, - ], - "type": "Identifier", - "value": "undefined", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 26, - }, - "start": Object { - "column": 18, - "line": 26, - }, - }, - "range": Array [ - 492, - 493, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 26, - }, - "start": Object { - "column": 20, - "line": 26, - }, - }, - "range": Array [ - 494, - 495, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 26, - }, - "start": Object { - "column": 21, - "line": 26, - }, - }, - "range": Array [ - 495, - 496, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 27, - }, - "start": Object { - "column": 2, - "line": 27, - }, - }, - "range": Array [ - 499, - 504, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 27, - }, - "start": Object { - "column": 8, - "line": 27, - }, - }, - "range": Array [ - 505, - 511, - ], - "type": "Identifier", - "value": "unique", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 27, - }, - "start": Object { - "column": 15, - "line": 27, - }, - }, - "range": Array [ - 512, - 513, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 27, - }, - "start": Object { - "column": 17, - "line": 27, - }, - }, - "range": Array [ - 514, - 515, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 27, - }, - "start": Object { - "column": 18, - "line": 27, - }, - }, - "range": Array [ - 515, - 516, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 28, - }, - "start": Object { - "column": 2, - "line": 28, - }, - }, - "range": Array [ - 519, - 524, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 28, - }, - "start": Object { - "column": 8, - "line": 28, - }, - }, - "range": Array [ - 525, - 532, - ], - "type": "Identifier", - "value": "unknown", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 28, - }, - "start": Object { - "column": 16, - "line": 28, - }, - }, - "range": Array [ - 533, - 534, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 28, - }, - "start": Object { - "column": 18, - "line": 28, - }, - }, - "range": Array [ - 535, - 536, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 28, - }, - "start": Object { - "column": 19, - "line": 28, - }, - }, - "range": Array [ - 536, - 537, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 29, - }, - "start": Object { - "column": 2, - "line": 29, - }, - }, - "range": Array [ - 540, - 545, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 29, - }, - "start": Object { - "column": 8, - "line": 29, - }, - }, - "range": Array [ - 546, - 550, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 29, - }, - "start": Object { - "column": 13, - "line": 29, - }, - }, - "range": Array [ - 551, - 552, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 29, - }, - "start": Object { - "column": 15, - "line": 29, - }, - }, - "range": Array [ - 553, - 554, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 29, - }, - "start": Object { - "column": 16, - "line": 29, - }, - }, - "range": Array [ - 554, - 555, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 30, - }, - "start": Object { - "column": 2, - "line": 30, - }, - }, - "range": Array [ - 558, - 563, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 30, - }, - "start": Object { - "column": 8, - "line": 30, - }, - }, - "range": Array [ - 564, - 570, - ], - "type": "Identifier", - "value": "global", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 30, - }, - "start": Object { - "column": 15, - "line": 30, - }, - }, - "range": Array [ - 571, - 572, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 30, - }, - "start": Object { - "column": 17, - "line": 30, - }, - }, - "range": Array [ - 573, - 574, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 30, - }, - "start": Object { - "column": 18, - "line": 30, - }, - }, - "range": Array [ - 574, - 575, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 31, - }, - "start": Object { - "column": 2, - "line": 31, - }, - }, - "range": Array [ - 578, - 583, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 31, - }, - "start": Object { - "column": 8, - "line": 31, - }, - }, - "range": Array [ - 584, - 590, - ], - "type": "Identifier", - "value": "bigint", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 31, - }, - "start": Object { - "column": 15, - "line": 31, - }, - }, - "range": Array [ - 591, - 592, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 31, - }, - "start": Object { - "column": 17, - "line": 31, - }, - }, - "range": Array [ - 593, - 594, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 31, - }, - "start": Object { - "column": 18, - "line": 31, - }, - }, - "range": Array [ - 594, - 595, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 32, - }, - "start": Object { - "column": 2, - "line": 32, - }, - }, - "range": Array [ - 598, - 603, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 32, - }, - "start": Object { - "column": 8, - "line": 32, - }, - }, - "range": Array [ - 604, - 606, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 32, - }, - "start": Object { - "column": 11, - "line": 32, - }, - }, - "range": Array [ - 607, - 608, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 32, - }, - "start": Object { - "column": 13, - "line": 32, - }, - }, - "range": Array [ - 609, - 610, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 32, - }, - "start": Object { - "column": 14, - "line": 32, - }, - }, - "range": Array [ - 610, - 611, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 33, - }, - "start": Object { - "column": 0, - "line": 33, - }, - }, - "range": Array [ - 612, - 613, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 35, - }, - "start": Object { - "column": 0, - "line": 35, - }, - }, - "range": Array [ - 615, - 621, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 35, - }, - "start": Object { - "column": 7, - "line": 35, - }, - }, - "range": Array [ - 622, - 623, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 36, - }, - "start": Object { - "column": 2, - "line": 36, - }, - }, - "range": Array [ - 626, - 634, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 36, - }, - "start": Object { - "column": 10, - "line": 36, - }, - }, - "range": Array [ - 634, - 635, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 37, - }, - "start": Object { - "column": 2, - "line": 37, - }, - }, - "range": Array [ - 638, - 640, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 37, - }, - "start": Object { - "column": 4, - "line": 37, - }, - }, - "range": Array [ - 640, - 641, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 38, - }, - "start": Object { - "column": 2, - "line": 38, - }, - }, - "range": Array [ - 644, - 651, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 38, - }, - "start": Object { - "column": 9, - "line": 38, - }, - }, - "range": Array [ - 651, - 652, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 39, - }, - "start": Object { - "column": 2, - "line": 39, - }, - }, - "range": Array [ - 655, - 658, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 39, - }, - "start": Object { - "column": 5, - "line": 39, - }, - }, - "range": Array [ - 658, - 659, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 40, - }, - "start": Object { - "column": 2, - "line": 40, - }, - }, - "range": Array [ - 662, - 667, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 40, - }, - "start": Object { - "column": 7, - "line": 40, - }, - }, - "range": Array [ - 667, - 668, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 41, - }, - "start": Object { - "column": 2, - "line": 41, - }, - }, - "range": Array [ - 671, - 676, - ], - "type": "Identifier", - "value": "await", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 41, - }, - "start": Object { - "column": 7, - "line": 41, - }, - }, - "range": Array [ - 676, - 677, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 42, - }, - "start": Object { - "column": 2, - "line": 42, - }, - }, - "range": Array [ - 680, - 687, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 42, - }, - "start": Object { - "column": 9, - "line": 42, - }, - }, - "range": Array [ - 687, - 688, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 43, - }, - "start": Object { - "column": 2, - "line": 43, - }, - }, - "range": Array [ - 691, - 702, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 43, - }, - "start": Object { - "column": 13, - "line": 43, - }, - }, - "range": Array [ - 702, - 703, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 44, - }, - "start": Object { - "column": 2, - "line": 44, - }, - }, - "range": Array [ - 706, - 713, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 44, - }, - "start": Object { - "column": 9, - "line": 44, - }, - }, - "range": Array [ - 713, - 714, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 45, - }, - "start": Object { - "column": 2, - "line": 45, - }, - }, - "range": Array [ - 717, - 720, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 45, - }, - "start": Object { - "column": 5, - "line": 45, - }, - }, - "range": Array [ - 720, - 721, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 46, - }, - "start": Object { - "column": 2, - "line": 46, - }, - }, - "range": Array [ - 724, - 729, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 46, - }, - "start": Object { - "column": 7, - "line": 46, - }, - }, - "range": Array [ - 729, - 730, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 47, - }, - "start": Object { - "column": 2, - "line": 47, - }, - }, - "range": Array [ - 733, - 735, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 47, - }, - "start": Object { - "column": 4, - "line": 47, - }, - }, - "range": Array [ - 735, - 736, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 48, - }, - "start": Object { - "column": 2, - "line": 48, - }, - }, - "range": Array [ - 739, - 744, - ], - "type": "Identifier", - "value": "keyof", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 48, - }, - "start": Object { - "column": 7, - "line": 48, - }, - }, - "range": Array [ - 744, - 745, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 49, - }, - "start": Object { - "column": 2, - "line": 49, - }, - }, - "range": Array [ - 748, - 754, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 49, - }, - "start": Object { - "column": 8, - "line": 49, - }, - }, - "range": Array [ - 754, - 755, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 50, - }, - "start": Object { - "column": 2, - "line": 50, - }, - }, - "range": Array [ - 758, - 767, - ], - "type": "Identifier", - "value": "namespace", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 50, - }, - "start": Object { - "column": 11, - "line": 50, - }, - }, - "range": Array [ - 767, - 768, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 51, - }, - "start": Object { - "column": 2, - "line": 51, - }, - }, - "range": Array [ - 771, - 776, - ], - "type": "Identifier", - "value": "never", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 51, - }, - "start": Object { - "column": 7, - "line": 51, - }, - }, - "range": Array [ - 776, - 777, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 52, - }, - "start": Object { - "column": 2, - "line": 52, - }, - }, - "range": Array [ - 780, - 788, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 52, - }, - "start": Object { - "column": 10, - "line": 52, - }, - }, - "range": Array [ - 788, - 789, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 53, - }, - "start": Object { - "column": 2, - "line": 53, - }, - }, - "range": Array [ - 792, - 799, - ], - "type": "Identifier", - "value": "require", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 53, - }, - "start": Object { - "column": 9, - "line": 53, - }, - }, - "range": Array [ - 799, - 800, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 54, - }, - "start": Object { - "column": 2, - "line": 54, - }, - }, - "range": Array [ - 803, - 809, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 54, - }, - "start": Object { - "column": 8, - "line": 54, - }, - }, - "range": Array [ - 809, - 810, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 55, - }, - "start": Object { - "column": 2, - "line": 55, - }, - }, - "range": Array [ - 813, - 819, - ], - "type": "Identifier", - "value": "object", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 55, - }, - "start": Object { - "column": 8, - "line": 55, - }, - }, - "range": Array [ - 819, - 820, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 56, - }, - "start": Object { - "column": 2, - "line": 56, - }, - }, - "range": Array [ - 823, - 826, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 56, - }, - "start": Object { - "column": 5, - "line": 56, - }, - }, - "range": Array [ - 826, - 827, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 57, - }, - "start": Object { - "column": 2, - "line": 57, - }, - }, - "range": Array [ - 830, - 836, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 57, - }, - "start": Object { - "column": 8, - "line": 57, - }, - }, - "range": Array [ - 836, - 837, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 58, - }, - "start": Object { - "column": 2, - "line": 58, - }, - }, - "range": Array [ - 840, - 846, - ], - "type": "Identifier", - "value": "symbol", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 58, - }, - "start": Object { - "column": 8, - "line": 58, - }, - }, - "range": Array [ - 846, - 847, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 59, - }, - "start": Object { - "column": 2, - "line": 59, - }, - }, - "range": Array [ - 850, - 854, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 59, - }, - "start": Object { - "column": 6, - "line": 59, - }, - }, - "range": Array [ - 854, - 855, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 60, - }, - "start": Object { - "column": 2, - "line": 60, - }, - }, - "range": Array [ - 858, - 867, - ], - "type": "Identifier", - "value": "undefined", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 60, - }, - "start": Object { - "column": 11, - "line": 60, - }, - }, - "range": Array [ - 867, - 868, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 61, - }, - "start": Object { - "column": 2, - "line": 61, - }, - }, - "range": Array [ - 871, - 877, - ], - "type": "Identifier", - "value": "unique", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 61, - }, - "start": Object { - "column": 8, - "line": 61, - }, - }, - "range": Array [ - 877, - 878, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 62, - }, - "start": Object { - "column": 2, - "line": 62, - }, - }, - "range": Array [ - 881, - 888, - ], - "type": "Identifier", - "value": "unknown", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 62, - }, - "start": Object { - "column": 9, - "line": 62, - }, - }, - "range": Array [ - 888, - 889, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 63, - }, - "start": Object { - "column": 2, - "line": 63, - }, - }, - "range": Array [ - 892, - 896, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 63, - }, - "start": Object { - "column": 6, - "line": 63, - }, - }, - "range": Array [ - 896, - 897, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 64, - }, - "start": Object { - "column": 2, - "line": 64, - }, - }, - "range": Array [ - 900, - 906, - ], - "type": "Identifier", - "value": "global", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 64, - }, - "start": Object { - "column": 8, - "line": 64, - }, - }, - "range": Array [ - 906, - 907, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 65, - }, - "start": Object { - "column": 2, - "line": 65, - }, - }, - "range": Array [ - 910, - 916, - ], - "type": "Identifier", - "value": "bigint", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 65, - }, - "start": Object { - "column": 8, - "line": 65, - }, - }, - "range": Array [ - 916, - 917, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 66, - }, - "start": Object { - "column": 2, - "line": 66, - }, - }, - "range": Array [ - 920, - 922, - ], - "type": "Identifier", - "value": "of", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 66, - }, - "start": Object { - "column": 4, - "line": 66, - }, - }, - "range": Array [ - 922, - 923, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 67, - }, - "start": Object { - "column": 0, - "line": 67, - }, - }, - "range": Array [ - 924, - 925, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 67, - }, - "start": Object { - "column": 2, - "line": 67, - }, - }, - "range": Array [ - 926, - 930, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 67, - }, - "start": Object { - "column": 7, - "line": 67, - }, - }, - "range": Array [ - 931, - 944, - ], - "type": "String", - "value": "'fake-module'", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 67, - }, - "start": Object { - "column": 20, - "line": 67, - }, - }, - "range": Array [ - 944, - 945, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 69, - }, - "start": Object { - "column": 0, - "line": 69, - }, - }, - "range": Array [ - 947, - 956, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 69, - }, - "start": Object { - "column": 10, - "line": 69, - }, - }, - "range": Array [ - 957, - 958, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 69, - }, - "start": Object { - "column": 12, - "line": 69, - }, - }, - "range": Array [ - 959, - 960, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 69, - }, - "start": Object { - "column": 13, - "line": 69, - }, - }, - "range": Array [ - 960, - 961, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 70, - }, - "start": Object { - "column": 0, - "line": 70, - }, - }, - "range": Array [ - 962, - 967, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 70, - }, - "start": Object { - "column": 6, - "line": 70, - }, - }, - "range": Array [ - 968, - 969, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 70, - }, - "start": Object { - "column": 8, - "line": 70, - }, - }, - "range": Array [ - 970, - 980, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 70, - }, - "start": Object { - "column": 19, - "line": 70, - }, - }, - "range": Array [ - 981, - 982, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 70, - }, - "start": Object { - "column": 21, - "line": 70, - }, - }, - "range": Array [ - 983, - 984, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 71, - }, - "start": Object { - "column": 2, - "line": 71, - }, - }, - "range": Array [ - 987, - 993, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 71, - }, - "start": Object { - "column": 9, - "line": 71, - }, - }, - "range": Array [ - 994, - 995, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 71, - }, - "start": Object { - "column": 10, - "line": 71, - }, - }, - "range": Array [ - 995, - 996, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 71, - }, - "start": Object { - "column": 11, - "line": 71, - }, - }, - "range": Array [ - 996, - 997, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 71, - }, - "start": Object { - "column": 13, - "line": 71, - }, - }, - "range": Array [ - 998, - 999, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 71, - }, - "start": Object { - "column": 14, - "line": 71, - }, - }, - "range": Array [ - 999, - 1000, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 72, - }, - "start": Object { - "column": 2, - "line": 72, - }, - }, - "range": Array [ - 1003, - 1010, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 72, - }, - "start": Object { - "column": 10, - "line": 72, - }, - }, - "range": Array [ - 1011, - 1012, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 72, - }, - "start": Object { - "column": 11, - "line": 72, - }, - }, - "range": Array [ - 1012, - 1013, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 72, - }, - "start": Object { - "column": 12, - "line": 72, - }, - }, - "range": Array [ - 1013, - 1014, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 72, - }, - "start": Object { - "column": 14, - "line": 72, - }, - }, - "range": Array [ - 1015, - 1016, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 72, - }, - "start": Object { - "column": 15, - "line": 72, - }, - }, - "range": Array [ - 1016, - 1017, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 73, - }, - "start": Object { - "column": 2, - "line": 73, - }, - }, - "range": Array [ - 1020, - 1026, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 73, - }, - "start": Object { - "column": 9, - "line": 73, - }, - }, - "range": Array [ - 1027, - 1028, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 73, - }, - "start": Object { - "column": 10, - "line": 73, - }, - }, - "range": Array [ - 1028, - 1029, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 73, - }, - "start": Object { - "column": 11, - "line": 73, - }, - }, - "range": Array [ - 1029, - 1030, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 73, - }, - "start": Object { - "column": 13, - "line": 73, - }, - }, - "range": Array [ - 1031, - 1032, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 73, - }, - "start": Object { - "column": 14, - "line": 73, - }, - }, - "range": Array [ - 1032, - 1033, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 74, - }, - "start": Object { - "column": 2, - "line": 74, - }, - }, - "range": Array [ - 1036, - 1045, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 74, - }, - "start": Object { - "column": 12, - "line": 74, - }, - }, - "range": Array [ - 1046, - 1047, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 74, - }, - "start": Object { - "column": 13, - "line": 74, - }, - }, - "range": Array [ - 1047, - 1048, - ], - "type": "Identifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 74, - }, - "start": Object { - "column": 14, - "line": 74, - }, - }, - "range": Array [ - 1048, - 1049, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 74, - }, - "start": Object { - "column": 15, - "line": 74, - }, - }, - "range": Array [ - 1049, - 1050, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 74, - }, - "start": Object { - "column": 17, - "line": 74, - }, - }, - "range": Array [ - 1051, - 1052, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 75, - }, - "start": Object { - "column": 4, - "line": 75, - }, - }, - "range": Array [ - 1057, - 1060, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 75, - }, - "start": Object { - "column": 8, - "line": 75, - }, - }, - "range": Array [ - 1061, - 1062, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 75, - }, - "start": Object { - "column": 10, - "line": 75, - }, - }, - "range": Array [ - 1063, - 1064, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 75, - }, - "start": Object { - "column": 12, - "line": 75, - }, - }, - "range": Array [ - 1065, - 1070, - ], - "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 75, - }, - "start": Object { - "column": 17, - "line": 75, - }, - }, - "range": Array [ - 1070, - 1071, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 76, - }, - "start": Object { - "column": 2, - "line": 76, - }, - }, - "range": Array [ - 1074, - 1075, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 77, - }, - "start": Object { - "column": 0, - "line": 77, - }, - }, - "range": Array [ - 1076, - 1077, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/nested-type-arguments.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/nested-type-arguments.src.ts.shot deleted file mode 100644 index 57445e1681a7..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/nested-type-arguments.src.ts.shot +++ /dev/null @@ -1,526 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics nested-type-arguments.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "nestedArray", - "optional": false, - "range": Array [ - 4, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 44, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "Array", - "optional": false, - "range": Array [ - 17, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 43, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "Array", - "optional": false, - "range": Array [ - 23, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 42, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "Array", - "optional": false, - "range": Array [ - 29, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "TSStringKeyword", - }, - ], - "range": Array [ - 34, - 42, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "range": Array [ - 28, - 43, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "range": Array [ - 22, - 44, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 44, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 15, - ], - "type": "Identifier", - "value": "nestedArray", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 22, - ], - "type": "Identifier", - "value": "Array", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "type": "Identifier", - "value": "Array", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "Identifier", - "value": "Array", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/never-type-param.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/never-type-param.src.ts.shot deleted file mode 100644 index 6d84c412d333..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/never-type-param.src.ts.shot +++ /dev/null @@ -1,618 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics never-type-param.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 15, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 15, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "TSNeverKeyword", - }, - ], - "range": Array [ - 8, - 15, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 15, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "VariableDeclaration", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": "Observable", - "optional": false, - "range": Array [ - 17, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "empty", - "optional": false, - "range": Array [ - 28, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 17, - 33, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 17, - 42, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 34, - 39, - ], - "type": "TSNeverKeyword", - }, - ], - "range": Array [ - 33, - 40, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 17, - 43, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Identifier", - "value": "never", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 17, - 27, - ], - "type": "Identifier", - "value": "Observable", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 28, - 33, - ], - "type": "Identifier", - "value": "empty", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 34, - 39, - ], - "type": "Identifier", - "value": "never", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/new-target-in-arrow-function-body.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/new-target-in-arrow-function-body.src.ts.shot deleted file mode 100644 index 3326909cd754..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/new-target-in-arrow-function-body.src.ts.shot +++ /dev/null @@ -1,350 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics new-target-in-arrow-function-body.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "meta": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "new", - "optional": false, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "target", - "optional": false, - "range": Array [ - 20, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 16, - 26, - ], - "type": "MetaProperty", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 10, - 26, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 26, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "Identifier", - "value": "target", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/non-null-assertion-operator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/non-null-assertion-operator.src.ts.shot deleted file mode 100644 index 6d2102b80868..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/non-null-assertion-operator.src.ts.shot +++ /dev/null @@ -1,801 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics non-null-assertion-operator.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 56, - 57, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "validateEntity", - "optional": false, - "range": Array [ - 41, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 41, - 58, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 41, - 59, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "s", - "optional": false, - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "object": Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 72, - 73, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 72, - 74, - ], - "type": "TSNonNullExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 75, - 79, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 72, - 79, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 68, - 79, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 64, - 80, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 82, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processEntity", - "optional": false, - "range": Array [ - 9, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "e", - "optional": true, - "range": Array [ - 23, - 33, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 33, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": "Entity", - "optional": false, - "range": Array [ - 27, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 0, - 82, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 82, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 22, - ], - "type": "Identifier", - "value": "processEntity", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "Identifier", - "value": "Entity", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 41, - 55, - ], - "type": "Identifier", - "value": "validateEntity", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 64, - 67, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - "value": "s", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 75, - 79, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/null-and-undefined-type-annotations.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/null-and-undefined-type-annotations.src.ts.shot deleted file mode 100644 index 38a5dee4492a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/null-and-undefined-type-annotations.src.ts.shot +++ /dev/null @@ -1,395 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics null-and-undefined-type-annotations.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 11, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "TSNullKeyword", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 11, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 17, - 29, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 18, - 29, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 20, - 29, - ], - "type": "TSUndefinedKeyword", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 29, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 13, - 30, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Keyword", - "value": "null", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 20, - 29, - ], - "type": "Identifier", - "value": "undefined", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/nullish-coalescing.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/nullish-coalescing.src.ts.shot deleted file mode 100644 index 6d53507132ca..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/nullish-coalescing.src.ts.shot +++ /dev/null @@ -1,606 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics nullish-coalescing.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "len", - "optional": false, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "s", - "optional": false, - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "operator": "??", - "range": Array [ - 59, - 66, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 64, - 66, - ], - "raw": "''", - "type": "Literal", - "value": "", - }, - "type": "LogicalExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 52, - 67, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 48, - 68, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 70, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processNullishCoalesce", - "optional": false, - "range": Array [ - 9, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "name": "s", - "optional": true, - "range": Array [ - 32, - 42, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 42, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 70, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 71, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 31, - ], - "type": "Identifier", - "value": "processNullishCoalesce", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "s", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 48, - 51, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "value": "len", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - "value": "s", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 61, - 63, - ], - "type": "Punctuator", - "value": "??", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 64, - 66, - ], - "type": "String", - "value": "''", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot deleted file mode 100644 index d8889f407b3a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot +++ /dev/null @@ -1,1101 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics object-with-escaped-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 7, - ], - "raw": "'__'", - "type": "Literal", - "value": "__", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 3, - 13, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "raw": "null", - "type": "Literal", - "value": null, - }, - }, - ], - "range": Array [ - 1, - 15, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 22, - 26, - ], - "raw": "'__'", - "type": "Literal", - "value": "__", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 22, - 31, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 26, - 31, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 20, - 33, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 19, - 35, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 41, - 45, - ], - "raw": "'__'", - "type": "Literal", - "value": "__", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 40, - 52, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 48, - 52, - ], - "raw": "null", - "type": "Literal", - "value": null, - }, - }, - ], - "range": Array [ - 38, - 54, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 37, - 56, - ], - "type": "ExpressionStatement", - }, - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 68, - 72, - ], - "raw": "'__'", - "type": "Literal", - "value": "__", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 68, - 79, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 75, - 79, - ], - "raw": "null", - "type": "Literal", - "value": null, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 66, - 81, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 64, - 65, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 58, - 81, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 82, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 7, - ], - "type": "String", - "value": "'__'", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "type": "Keyword", - "value": "null", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 22, - 26, - ], - "type": "String", - "value": "'__'", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 41, - 45, - ], - "type": "String", - "value": "'__'", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 48, - 52, - ], - "type": "Keyword", - "value": "null", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 58, - 63, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 68, - 72, - ], - "type": "String", - "value": "'__'", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 7, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 75, - 79, - ], - "type": "Keyword", - "value": "null", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 22, - "line": 7, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-typed-methods.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-typed-methods.src.ts.shot deleted file mode 100644 index 83b6c9fc83d6..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-typed-methods.src.ts.shot +++ /dev/null @@ -1,1838 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics object-with-typed-methods.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 16, - 29, - ], - "raw": "\\"constructor\\"", - "type": "Literal", - "value": "constructor", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 16, - 61, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 56, - 57, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 49, - 57, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 43, - 61, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 29, - 61, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 34, - 42, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 30, - 31, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 29, - 32, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 65, - 68, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "method": true, - "optional": false, - "range": Array [ - 65, - 100, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 95, - 96, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 88, - 96, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 82, - 100, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "params": Array [], - "range": Array [ - 68, - 100, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 73, - 81, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 75, - 81, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 69, - 70, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 69, - 70, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 68, - 71, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 8, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 108, - 109, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 3, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 104, - 138, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 133, - 134, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 126, - 134, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 10, - }, - "start": Object { - "column": 18, - "line": 8, - }, - }, - "range": Array [ - 120, - 138, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 10, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "params": Array [], - "range": Array [ - 109, - 138, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "range": Array [ - 111, - 119, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "range": Array [ - 113, - 119, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 11, - }, - "start": Object { - "column": 6, - "line": 11, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 146, - 147, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 3, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 11, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 142, - 172, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 12, - }, - "start": Object { - "column": 27, - "line": 11, - }, - }, - "range": Array [ - 167, - 172, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 12, - }, - "start": Object { - "column": 7, - "line": 11, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 11, - }, - "start": Object { - "column": 8, - "line": 11, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 148, - 157, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 11, - }, - "start": Object { - "column": 9, - "line": 11, - }, - }, - "range": Array [ - 149, - 157, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 11, - }, - "start": Object { - "column": 11, - "line": 11, - }, - }, - "range": Array [ - 151, - 157, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 147, - 172, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 11, - }, - "start": Object { - "column": 18, - "line": 11, - }, - }, - "range": Array [ - 158, - 166, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 11, - }, - "start": Object { - "column": 20, - "line": 11, - }, - }, - "range": Array [ - 160, - 166, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "range": Array [ - 12, - 174, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 174, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 2, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 175, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 14, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 176, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 16, - 29, - ], - "type": "String", - "value": "\\"constructor\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 49, - 55, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 65, - 68, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 75, - 81, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 88, - 94, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 99, - 100, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 100, - 101, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 104, - 107, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 8, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "range": Array [ - 113, - 119, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 8, - }, - "start": Object { - "column": 18, - "line": 8, - }, - }, - "range": Array [ - 120, - 121, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 126, - 132, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 133, - 134, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 137, - 138, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 10, - }, - "start": Object { - "column": 3, - "line": 10, - }, - }, - "range": Array [ - 138, - 139, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 2, - "line": 11, - }, - }, - "range": Array [ - 142, - 145, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 11, - }, - "start": Object { - "column": 6, - "line": 11, - }, - }, - "range": Array [ - 146, - 147, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 11, - }, - "start": Object { - "column": 7, - "line": 11, - }, - }, - "range": Array [ - 147, - 148, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 11, - }, - "start": Object { - "column": 8, - "line": 11, - }, - }, - "range": Array [ - 148, - 149, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 11, - }, - "start": Object { - "column": 9, - "line": 11, - }, - }, - "range": Array [ - 149, - 150, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 11, - }, - "start": Object { - "column": 11, - "line": 11, - }, - }, - "range": Array [ - 151, - 157, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 11, - }, - "start": Object { - "column": 17, - "line": 11, - }, - }, - "range": Array [ - 157, - 158, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 11, - }, - "start": Object { - "column": 18, - "line": 11, - }, - }, - "range": Array [ - 158, - 159, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 11, - }, - "start": Object { - "column": 20, - "line": 11, - }, - }, - "range": Array [ - 160, - 166, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 11, - }, - "start": Object { - "column": 27, - "line": 11, - }, - }, - "range": Array [ - 167, - 168, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "range": Array [ - 171, - 172, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 13, - }, - }, - "range": Array [ - 173, - 174, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 13, - }, - "start": Object { - "column": 1, - "line": 13, - }, - }, - "range": Array [ - 174, - 175, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call-with-non-null-assertion.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call-with-non-null-assertion.src.ts.shot deleted file mode 100644 index 95c6baf56da6..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call-with-non-null-assertion.src.ts.shot +++ /dev/null @@ -1,2252 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics optional-chain-call-with-non-null-assertion.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 40, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 45, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 40, - 48, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 49, - ], - "type": "TSNonNullExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 40, - 51, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 51, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 52, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 55, - 58, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 60, - 63, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 55, - 63, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 55, - 64, - ], - "type": "TSNonNullExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 65, - 70, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 55, - 70, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 55, - 72, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 55, - 72, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 55, - 73, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 77, - 80, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 82, - 85, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 77, - 85, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 77, - 85, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 76, - 87, - ], - "type": "TSNonNullExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "range": Array [ - 76, - 89, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 76, - 90, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 94, - 97, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 99, - 102, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 94, - 102, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 94, - 102, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 93, - 104, - ], - "type": "TSNonNullExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 105, - 110, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 93, - 110, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "range": Array [ - 93, - 112, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 93, - 113, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 117, - 120, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 122, - 125, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 117, - 125, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 117, - 126, - ], - "type": "TSNonNullExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 117, - 126, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "optional": false, - "range": Array [ - 116, - 129, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 116, - 130, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "object": Object { - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 134, - 137, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 139, - 142, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 134, - 142, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 134, - 143, - ], - "type": "TSNonNullExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 134, - 143, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 145, - 150, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 133, - 150, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "optional": false, - "range": Array [ - 133, - 152, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 133, - 153, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 155, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processOptional", - "optional": false, - "range": Array [ - 9, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "one", - "optional": true, - "range": Array [ - 25, - 34, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 155, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 156, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 24, - ], - "type": "Identifier", - "value": "processOptional", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 43, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 43, - 45, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 55, - 58, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 58, - 60, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 60, - 63, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 65, - 70, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 77, - 80, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 80, - 82, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 82, - 85, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 87, - 88, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 93, - 94, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 94, - 97, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 97, - 99, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 99, - 102, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 104, - 105, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 105, - 110, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 116, - 117, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 117, - 120, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 120, - 122, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 122, - 125, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 126, - 127, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 127, - 128, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 128, - 129, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 15, - "line": 6, - }, - }, - "range": Array [ - 129, - 130, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 133, - 134, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 134, - 137, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 137, - 139, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 139, - 142, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 142, - 143, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 143, - 144, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 7, - }, - }, - "range": Array [ - 144, - 145, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "range": Array [ - 145, - 150, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 19, - "line": 7, - }, - }, - "range": Array [ - 150, - 151, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "range": Array [ - 151, - 152, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 7, - }, - "start": Object { - "column": 21, - "line": 7, - }, - }, - "range": Array [ - 152, - 153, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 154, - 155, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call-with-parens.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call-with-parens.src.ts.shot deleted file mode 100644 index 389216de89c0..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call-with-parens.src.ts.shot +++ /dev/null @@ -1,3113 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics optional-chain-call-with-parens.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 56, - 58, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 51, - 58, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 51, - 60, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 51, - 60, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 50, - 62, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 66, - 69, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 71, - 74, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 66, - 74, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 66, - 74, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 76, - 78, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 65, - 78, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 65, - 80, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 65, - 81, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 85, - 88, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 89, - 92, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 85, - 92, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 94, - 96, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 85, - 96, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "optional": false, - "range": Array [ - 85, - 98, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 85, - 98, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 84, - 100, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 104, - 107, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 108, - 111, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 104, - 111, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 113, - 118, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 104, - 118, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 104, - 118, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 120, - 122, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 103, - 122, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "range": Array [ - 103, - 124, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 103, - 125, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 129, - 132, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 133, - 136, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 129, - 136, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 138, - 143, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 129, - 143, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 145, - 147, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 129, - 147, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "optional": false, - "range": Array [ - 129, - 149, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 129, - 149, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 128, - 151, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 8, - }, - "start": Object { - "column": 3, - "line": 8, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 156, - 159, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 3, - "line": 8, - }, - }, - "optional": true, - "range": Array [ - 156, - 163, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 3, - "line": 8, - }, - }, - "range": Array [ - 156, - 163, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 155, - 165, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 9, - }, - "start": Object { - "column": 3, - "line": 9, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 169, - 172, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 3, - "line": 9, - }, - }, - "optional": true, - "range": Array [ - 169, - 176, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 3, - "line": 9, - }, - }, - "range": Array [ - 169, - 176, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "optional": false, - "range": Array [ - 168, - 179, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 168, - 180, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 10, - }, - "start": Object { - "column": 3, - "line": 10, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 184, - 187, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 10, - }, - "start": Object { - "column": 3, - "line": 10, - }, - }, - "optional": true, - "range": Array [ - 184, - 191, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 10, - }, - "start": Object { - "column": 3, - "line": 10, - }, - }, - "range": Array [ - 184, - 191, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "optional": true, - "range": Array [ - 183, - 196, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 183, - 196, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 183, - 197, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "object": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 12, - }, - "start": Object { - "column": 3, - "line": 12, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 202, - 205, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 3, - "line": 12, - }, - }, - "optional": true, - "range": Array [ - 202, - 209, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 3, - "line": 12, - }, - }, - "range": Array [ - 202, - 209, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 12, - }, - "start": Object { - "column": 12, - "line": 12, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 211, - 214, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 201, - 214, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "range": Array [ - 201, - 215, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 217, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processOptionalCallParens", - "optional": false, - "range": Array [ - 9, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "one", - "optional": true, - "range": Array [ - 35, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 44, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 217, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 14, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 218, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 34, - ], - "type": "Identifier", - "value": "processOptionalCallParens", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 38, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 44, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 54, - 56, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 56, - 58, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 66, - 69, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 69, - 71, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 71, - 74, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 76, - 78, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 85, - 88, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 89, - 92, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 92, - 94, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 94, - 96, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 99, - 100, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 104, - 107, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 108, - 111, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 111, - 113, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 113, - 118, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 118, - 119, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 119, - 120, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 120, - 122, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, - }, - }, - "range": Array [ - 122, - 123, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 123, - 124, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 23, - "line": 5, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 128, - 129, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 129, - 132, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 133, - 136, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 136, - 138, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 138, - 143, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 143, - 145, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 145, - 147, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 21, - "line": 6, - }, - }, - "range": Array [ - 147, - 148, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 22, - "line": 6, - }, - }, - "range": Array [ - 148, - 149, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "range": Array [ - 149, - 150, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 24, - "line": 6, - }, - }, - "range": Array [ - 150, - 151, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 155, - 156, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 8, - }, - "start": Object { - "column": 3, - "line": 8, - }, - }, - "range": Array [ - 156, - 159, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 8, - }, - }, - "range": Array [ - 159, - 161, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 161, - 162, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "range": Array [ - 162, - 163, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "range": Array [ - 163, - 164, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "range": Array [ - 164, - 165, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 168, - 169, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 9, - }, - "start": Object { - "column": 3, - "line": 9, - }, - }, - "range": Array [ - 169, - 172, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 9, - }, - }, - "range": Array [ - 172, - 174, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "range": Array [ - 174, - 175, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 9, - "line": 9, - }, - }, - "range": Array [ - 175, - 176, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 9, - }, - "start": Object { - "column": 10, - "line": 9, - }, - }, - "range": Array [ - 176, - 177, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 177, - 178, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "range": Array [ - 178, - 179, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 9, - }, - "start": Object { - "column": 13, - "line": 9, - }, - }, - "range": Array [ - 179, - 180, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 183, - 184, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 10, - }, - "start": Object { - "column": 3, - "line": 10, - }, - }, - "range": Array [ - 184, - 187, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 10, - }, - "start": Object { - "column": 6, - "line": 10, - }, - }, - "range": Array [ - 187, - 189, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "range": Array [ - 189, - 190, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 10, - }, - "start": Object { - "column": 9, - "line": 10, - }, - }, - "range": Array [ - 190, - 191, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 10, - }, - "start": Object { - "column": 10, - "line": 10, - }, - }, - "range": Array [ - 191, - 192, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 10, - }, - "start": Object { - "column": 11, - "line": 10, - }, - }, - "range": Array [ - 192, - 194, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 10, - }, - "start": Object { - "column": 13, - "line": 10, - }, - }, - "range": Array [ - 194, - 195, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 14, - "line": 10, - }, - }, - "range": Array [ - 195, - 196, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 10, - }, - "start": Object { - "column": 15, - "line": 10, - }, - }, - "range": Array [ - 196, - 197, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "range": Array [ - 201, - 202, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 12, - }, - "start": Object { - "column": 3, - "line": 12, - }, - }, - "range": Array [ - 202, - 205, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 12, - }, - "start": Object { - "column": 6, - "line": 12, - }, - }, - "range": Array [ - 205, - 207, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "range": Array [ - 207, - 208, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 12, - }, - }, - "range": Array [ - 208, - 209, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 12, - }, - "start": Object { - "column": 10, - "line": 12, - }, - }, - "range": Array [ - 209, - 210, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 12, - }, - "start": Object { - "column": 11, - "line": 12, - }, - }, - "range": Array [ - 210, - 211, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 12, - }, - "start": Object { - "column": 12, - "line": 12, - }, - }, - "range": Array [ - 211, - 214, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 12, - }, - "start": Object { - "column": 15, - "line": 12, - }, - }, - "range": Array [ - 214, - 215, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 13, - }, - }, - "range": Array [ - 216, - 217, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call.src.ts.shot deleted file mode 100644 index 64eafcb5be3b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-call.src.ts.shot +++ /dev/null @@ -1,2772 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics optional-chain-call.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 44, - 47, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 49, - 51, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 44, - 51, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 44, - 53, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 44, - 53, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 44, - 54, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 57, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 62, - 65, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 57, - 65, - ], - "type": "MemberExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 66, - 68, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 57, - 68, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 57, - 70, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 57, - 70, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 57, - 71, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 74, - 77, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 78, - 81, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 74, - 81, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 83, - 85, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 74, - 85, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "range": Array [ - 74, - 87, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 74, - 87, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 74, - 88, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 91, - 94, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 95, - 98, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 91, - 98, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 100, - 105, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 91, - 105, - ], - "type": "MemberExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 106, - 108, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 91, - 108, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "range": Array [ - 91, - 110, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 91, - 110, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 91, - 111, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 114, - 117, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 118, - 121, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 114, - 121, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 123, - 128, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 114, - 128, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 130, - 132, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 114, - 132, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "optional": false, - "range": Array [ - 114, - 134, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 114, - 134, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 114, - 135, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 139, - 142, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "optional": true, - "range": Array [ - 139, - 146, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 139, - 146, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 139, - 147, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 150, - 153, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "optional": true, - "range": Array [ - 150, - 157, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "optional": false, - "range": Array [ - 150, - 159, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 150, - 159, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 150, - 160, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 163, - 166, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "optional": true, - "range": Array [ - 163, - 170, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "optional": true, - "range": Array [ - 163, - 174, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 163, - 174, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 163, - 175, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "object": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 179, - 182, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "optional": true, - "range": Array [ - 179, - 186, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 10, - "line": 12, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 187, - 190, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 179, - 190, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "range": Array [ - 179, - 190, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "range": Array [ - 179, - 191, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 193, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processOptionalCall", - "optional": false, - "range": Array [ - 9, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "one", - "optional": true, - "range": Array [ - 29, - 38, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 38, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 193, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 14, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 194, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 28, - ], - "type": "Identifier", - "value": "processOptionalCall", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 38, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 44, - 47, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 47, - 49, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 49, - 51, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 57, - 60, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 60, - 62, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 62, - 65, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 66, - 68, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 74, - 77, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 78, - 81, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 81, - 83, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 83, - 85, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 87, - 88, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 91, - 94, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 95, - 98, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 98, - 100, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 100, - 105, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 106, - 108, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 114, - 117, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 118, - 121, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 121, - 123, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 123, - 128, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 128, - 130, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 130, - 132, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 20, - "line": 6, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 21, - "line": 6, - }, - }, - "range": Array [ - 133, - 134, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 22, - "line": 6, - }, - }, - "range": Array [ - 134, - 135, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 139, - 142, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 5, - "line": 8, - }, - }, - "range": Array [ - 142, - 144, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "range": Array [ - 144, - 145, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 145, - 146, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "range": Array [ - 146, - 147, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 9, - }, - }, - "range": Array [ - 150, - 153, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "range": Array [ - 153, - 155, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 9, - }, - "start": Object { - "column": 7, - "line": 9, - }, - }, - "range": Array [ - 155, - 156, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 9, - }, - }, - "range": Array [ - 156, - 157, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 9, - "line": 9, - }, - }, - "range": Array [ - 157, - 158, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 9, - }, - "start": Object { - "column": 10, - "line": 9, - }, - }, - "range": Array [ - 158, - 159, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 159, - 160, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 163, - 166, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 10, - }, - "start": Object { - "column": 5, - "line": 10, - }, - }, - "range": Array [ - 166, - 168, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 10, - }, - "start": Object { - "column": 7, - "line": 10, - }, - }, - "range": Array [ - 168, - 169, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "range": Array [ - 169, - 170, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 10, - }, - "start": Object { - "column": 9, - "line": 10, - }, - }, - "range": Array [ - 170, - 172, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 10, - }, - "start": Object { - "column": 11, - "line": 10, - }, - }, - "range": Array [ - 172, - 173, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 10, - }, - "start": Object { - "column": 12, - "line": 10, - }, - }, - "range": Array [ - 173, - 174, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 10, - }, - "start": Object { - "column": 13, - "line": 10, - }, - }, - "range": Array [ - 174, - 175, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "range": Array [ - 179, - 182, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 12, - }, - "start": Object { - "column": 5, - "line": 12, - }, - }, - "range": Array [ - 182, - 184, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 12, - }, - "start": Object { - "column": 7, - "line": 12, - }, - }, - "range": Array [ - 184, - 185, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "range": Array [ - 185, - 186, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 12, - }, - }, - "range": Array [ - 186, - 187, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 10, - "line": 12, - }, - }, - "range": Array [ - 187, - 190, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 12, - }, - "start": Object { - "column": 13, - "line": 12, - }, - }, - "range": Array [ - 190, - 191, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 13, - }, - "start": Object { - "column": 0, - "line": 13, - }, - }, - "range": Array [ - 192, - 193, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access-with-non-null-assertion.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access-with-non-null-assertion.src.ts.shot deleted file mode 100644 index 4cb400722838..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access-with-non-null-assertion.src.ts.shot +++ /dev/null @@ -1,2294 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics optional-chain-element-access-with-non-null-assertion.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "object": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 40, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 46, - 51, - ], - "raw": "'two'", - "type": "Literal", - "value": "two", - }, - "range": Array [ - 40, - 52, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 53, - ], - "type": "TSNonNullExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 54, - 59, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 40, - 59, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 59, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 60, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 64, - 67, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 70, - 75, - ], - "raw": "'two'", - "type": "Literal", - "value": "two", - }, - "range": Array [ - 64, - 76, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 64, - 76, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 63, - 78, - ], - "type": "TSNonNullExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 79, - 84, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 63, - 84, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 63, - 85, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "object": Object { - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 89, - 92, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 95, - 100, - ], - "raw": "'two'", - "type": "Literal", - "value": "two", - }, - "range": Array [ - 89, - 101, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 89, - 102, - ], - "type": "TSNonNullExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 89, - 102, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 104, - 109, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 88, - 109, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 88, - 110, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 113, - 116, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 118, - 121, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 113, - 121, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 113, - 122, - ], - "type": "TSNonNullExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 123, - 130, - ], - "raw": "'three'", - "type": "Literal", - "value": "three", - }, - "range": Array [ - 113, - 131, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 113, - 131, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 113, - 132, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "object": Object { - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 136, - 139, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 141, - 144, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 136, - 144, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 136, - 144, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 135, - 146, - ], - "type": "TSNonNullExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 147, - 154, - ], - "raw": "'three'", - "type": "Literal", - "value": "three", - }, - "range": Array [ - 135, - 155, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 135, - 156, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 22, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "object": Object { - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 160, - 163, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 165, - 168, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 160, - 168, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 160, - 169, - ], - "type": "TSNonNullExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 160, - 169, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "range": Array [ - 171, - 178, - ], - "raw": "'three'", - "type": "Literal", - "value": "three", - }, - "range": Array [ - 159, - 179, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 159, - 180, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 182, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processOptional", - "optional": false, - "range": Array [ - 9, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "one", - "optional": true, - "range": Array [ - 25, - 34, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 182, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 183, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 24, - ], - "type": "Identifier", - "value": "processOptional", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 43, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 43, - 45, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 46, - 51, - ], - "type": "String", - "value": "'two'", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 54, - 59, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 64, - 67, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 67, - 69, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 70, - 75, - ], - "type": "String", - "value": "'two'", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 79, - 84, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 89, - 92, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 92, - 94, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 95, - 100, - ], - "type": "String", - "value": "'two'", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 100, - 101, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 101, - 102, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 104, - 109, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 113, - 116, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 116, - 118, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 118, - 121, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 121, - 122, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 122, - 123, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 123, - 130, - ], - "type": "String", - "value": "'three'", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 130, - 131, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "range": Array [ - 131, - 132, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 135, - 136, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 136, - 139, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 139, - 141, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 141, - 144, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 144, - 145, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 145, - 146, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 146, - 147, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 147, - 154, - ], - "type": "String", - "value": "'three'", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 21, - "line": 6, - }, - }, - "range": Array [ - 154, - 155, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 22, - "line": 6, - }, - }, - "range": Array [ - 155, - 156, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 159, - 160, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 160, - 163, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 163, - 165, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 165, - 168, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 168, - 169, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 169, - 170, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 7, - }, - }, - "range": Array [ - 170, - 171, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "range": Array [ - 171, - 178, - ], - "type": "String", - "value": "'three'", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 7, - }, - "start": Object { - "column": 21, - "line": 7, - }, - }, - "range": Array [ - 178, - 179, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 22, - "line": 7, - }, - }, - "range": Array [ - 179, - 180, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 181, - 182, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access-with-parens.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access-with-parens.src.ts.shot deleted file mode 100644 index b9bcd42e586c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access-with-parens.src.ts.shot +++ /dev/null @@ -1,2618 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics optional-chain-element-access-with-parens.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 54, - 57, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 60, - 61, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 54, - 62, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 54, - 62, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 53, - 64, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 68, - 71, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 74, - 75, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 68, - 76, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 68, - 76, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 78, - 79, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "range": Array [ - 67, - 80, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 67, - 81, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 85, - 88, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 89, - 90, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 85, - 91, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 94, - 95, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "range": Array [ - 85, - 96, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 85, - 96, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 84, - 98, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 102, - 105, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 106, - 107, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 102, - 108, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 111, - 112, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "range": Array [ - 102, - 113, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 102, - 113, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 115, - 116, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "range": Array [ - 101, - 117, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 101, - 118, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 122, - 125, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 126, - 127, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 122, - 128, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 131, - 132, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "range": Array [ - 122, - 133, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 136, - 137, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "range": Array [ - 122, - 138, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 122, - 138, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 121, - 140, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "object": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 144, - 147, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 148, - 149, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 144, - 150, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 153, - 154, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "range": Array [ - 144, - 155, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 158, - 159, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "range": Array [ - 144, - 160, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 144, - 160, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 7, - }, - "start": Object { - "column": 21, - "line": 7, - }, - }, - "range": Array [ - 162, - 163, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "range": Array [ - 143, - 164, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 143, - 165, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 167, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processOptionalElementParens", - "optional": false, - "range": Array [ - 9, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "name": "one", - "optional": true, - "range": Array [ - 38, - 47, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 47, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 47, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 167, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 168, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 37, - ], - "type": "Identifier", - "value": "processOptionalElementParens", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 41, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 47, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 54, - 57, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 57, - 59, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 68, - 71, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 71, - 73, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 85, - 88, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 91, - 93, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 93, - 94, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 101, - 102, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 102, - 105, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 108, - 110, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 113, - 114, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 115, - 116, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 116, - 117, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 121, - 122, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 122, - 125, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 126, - 127, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 127, - 128, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 128, - 130, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 130, - 131, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 131, - 132, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 133, - 135, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 135, - 136, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 136, - 137, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 137, - 138, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 138, - 139, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 20, - "line": 6, - }, - }, - "range": Array [ - 139, - 140, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 143, - 144, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 144, - 147, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 147, - 148, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 148, - 149, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 149, - 150, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "range": Array [ - 150, - 152, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 152, - 153, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 153, - 154, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 7, - }, - }, - "range": Array [ - 154, - 155, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "range": Array [ - 155, - 157, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 7, - }, - }, - "range": Array [ - 157, - 158, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 158, - 159, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 18, - "line": 7, - }, - }, - "range": Array [ - 159, - 160, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 19, - "line": 7, - }, - }, - "range": Array [ - 160, - 161, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "range": Array [ - 161, - 162, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 7, - }, - "start": Object { - "column": 21, - "line": 7, - }, - }, - "range": Array [ - 162, - 163, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 22, - "line": 7, - }, - }, - "range": Array [ - 163, - 164, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 7, - }, - "start": Object { - "column": 23, - "line": 7, - }, - }, - "range": Array [ - 164, - 165, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 166, - 167, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access.src.ts.shot deleted file mode 100644 index 65a342a69b0f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-element-access.src.ts.shot +++ /dev/null @@ -1,2200 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics optional-chain-element-access.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 47, - 55, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 47, - 55, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 47, - 56, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 59, - 62, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 65, - 66, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 59, - 67, - ], - "type": "MemberExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 68, - 69, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "range": Array [ - 59, - 70, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 59, - 70, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 59, - 71, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 74, - 77, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 78, - 79, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 74, - 80, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 83, - 84, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "range": Array [ - 74, - 85, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 74, - 85, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 74, - 86, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 89, - 92, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 93, - 94, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 89, - 95, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 98, - 99, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "range": Array [ - 89, - 100, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 89, - 100, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 89, - 101, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 104, - 107, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 108, - 109, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 104, - 110, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 113, - 114, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "range": Array [ - 104, - 115, - ], - "type": "MemberExpression", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 116, - 117, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "range": Array [ - 104, - 118, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 104, - 118, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 104, - 119, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "object": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 122, - 125, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 126, - 127, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "range": Array [ - 122, - 128, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 131, - 132, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "range": Array [ - 122, - 133, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 7, - }, - }, - "range": Array [ - 136, - 137, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "range": Array [ - 122, - 138, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 122, - 138, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 122, - 139, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 141, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processOptionalElement", - "optional": false, - "range": Array [ - 9, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "name": "one", - "optional": true, - "range": Array [ - 32, - 41, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 41, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 41, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 141, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 142, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 31, - ], - "type": "Identifier", - "value": "processOptionalElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 41, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 50, - 52, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 59, - 62, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 62, - 64, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 74, - 77, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 80, - 82, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 89, - 92, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 93, - 94, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 95, - 97, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 99, - 100, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 100, - 101, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 104, - 107, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 110, - 112, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 113, - 114, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 115, - 116, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 116, - 117, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 15, - "line": 6, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 118, - 119, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 122, - 125, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 126, - 127, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 127, - 128, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 128, - 130, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 130, - 131, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 131, - 132, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 7, - }, - }, - "range": Array [ - 133, - 135, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 7, - }, - }, - "range": Array [ - 135, - 136, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 7, - }, - }, - "range": Array [ - 136, - 137, - ], - "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 137, - 138, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 18, - "line": 7, - }, - }, - "range": Array [ - 138, - 139, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 140, - 141, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-with-non-null-assertion.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-with-non-null-assertion.src.ts.shot deleted file mode 100644 index 8d488e0d54e6..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-with-non-null-assertion.src.ts.shot +++ /dev/null @@ -1,1235 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics optional-chain-with-non-null-assertion.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "object": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 40, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 45, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 40, - 48, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 49, - ], - "type": "TSNonNullExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 50, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 40, - 55, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 55, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 56, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 60, - 63, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 65, - 68, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 60, - 68, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 60, - 68, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 59, - 70, - ], - "type": "TSNonNullExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 71, - 76, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 59, - 76, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 59, - 77, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "object": Object { - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 81, - 84, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 86, - 89, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 81, - 89, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 81, - 90, - ], - "type": "TSNonNullExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 81, - 90, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 92, - 97, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 80, - 97, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 80, - 98, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 100, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processOptional", - "optional": false, - "range": Array [ - 9, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "one", - "optional": true, - "range": Array [ - 25, - 34, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 100, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 101, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 24, - ], - "type": "Identifier", - "value": "processOptional", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 43, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 43, - 45, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 50, - 55, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 60, - 63, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 63, - 65, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 65, - 68, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 71, - 76, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 81, - 84, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 84, - 86, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 86, - 89, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 91, - 92, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 92, - 97, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 99, - 100, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-with-parens.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-with-parens.src.ts.shot deleted file mode 100644 index abb458ba8fb0..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain-with-parens.src.ts.shot +++ /dev/null @@ -1,2234 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics optional-chain-with-parens.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 47, - 55, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 47, - 55, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 46, - 57, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 61, - 64, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 66, - 69, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 61, - 69, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 61, - 69, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 71, - 76, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 60, - 76, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 60, - 77, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 81, - 84, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 85, - 88, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 81, - 88, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 90, - 95, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 81, - 95, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 81, - 95, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 80, - 97, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 101, - 104, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 105, - 108, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 101, - 108, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 110, - 115, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 101, - 115, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 101, - 115, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "name": "four", - "optional": false, - "range": Array [ - 117, - 121, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 100, - 121, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 100, - 122, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 126, - 129, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 130, - 133, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 126, - 133, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 135, - 140, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 126, - 140, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "name": "four", - "optional": false, - "range": Array [ - 142, - 146, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 126, - 146, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 126, - 146, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 125, - 148, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 29, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "object": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 152, - 155, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 156, - 159, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 152, - 159, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 161, - 166, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 152, - 166, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 19, - "line": 7, - }, - }, - "name": "four", - "optional": false, - "range": Array [ - 168, - 172, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 152, - 172, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 152, - 172, - ], - "type": "ChainExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 7, - }, - "start": Object { - "column": 25, - "line": 7, - }, - }, - "name": "five", - "optional": false, - "range": Array [ - 174, - 178, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 151, - 178, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 151, - 179, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 181, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processOptionalParens", - "optional": false, - "range": Array [ - 9, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "one", - "optional": true, - "range": Array [ - 31, - 40, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 40, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 40, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 181, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 182, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 30, - ], - "type": "Identifier", - "value": "processOptionalParens", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 40, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 50, - 52, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 61, - 64, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 64, - 66, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 66, - 69, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 71, - 76, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 81, - 84, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 85, - 88, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 88, - 90, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 90, - 95, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 100, - 101, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 101, - 104, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 104, - 105, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 105, - 108, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 108, - 110, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 110, - 115, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 115, - 116, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 116, - 117, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 117, - 121, - ], - "type": "Identifier", - "value": "four", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 23, - "line": 5, - }, - }, - "range": Array [ - 121, - 122, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 3, - "line": 6, - }, - }, - "range": Array [ - 126, - 129, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 129, - 130, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 130, - 133, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 133, - 135, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 135, - 140, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 140, - 142, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 142, - 146, - ], - "type": "Identifier", - "value": "four", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 6, - }, - }, - "range": Array [ - 146, - 147, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 24, - "line": 6, - }, - }, - "range": Array [ - 147, - 148, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 151, - 152, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 3, - "line": 7, - }, - }, - "range": Array [ - 152, - 155, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 155, - 156, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 156, - 159, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 159, - 161, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 161, - 166, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 166, - 168, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 19, - "line": 7, - }, - }, - "range": Array [ - 168, - 172, - ], - "type": "Identifier", - "value": "four", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 7, - }, - "start": Object { - "column": 23, - "line": 7, - }, - }, - "range": Array [ - 172, - 173, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 7, - }, - "start": Object { - "column": 24, - "line": 7, - }, - }, - "range": Array [ - 173, - 174, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 7, - }, - "start": Object { - "column": 25, - "line": 7, - }, - }, - "range": Array [ - 174, - 178, - ], - "type": "Identifier", - "value": "five", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 7, - }, - "start": Object { - "column": 29, - "line": 7, - }, - }, - "range": Array [ - 178, - 179, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 180, - 181, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain.src.ts.shot deleted file mode 100644 index d6a2c2b96e8e..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/optional-chain.src.ts.shot +++ /dev/null @@ -1,1622 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics optional-chain.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 40, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 45, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 40, - 48, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 48, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 49, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 57, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 52, - 60, - ], - "type": "MemberExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 61, - 66, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 52, - 66, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 52, - 66, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 52, - 67, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 70, - 73, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 74, - 77, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 70, - 77, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 79, - 84, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 70, - 84, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 70, - 84, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 70, - 85, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 88, - 91, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 92, - 95, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 88, - 95, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 97, - 102, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 88, - 102, - ], - "type": "MemberExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "name": "four", - "optional": false, - "range": Array [ - 103, - 107, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 88, - 107, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 88, - 107, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 88, - 108, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "object": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "name": "one", - "optional": false, - "range": Array [ - 111, - 114, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "name": "two", - "optional": false, - "range": Array [ - 115, - 118, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 111, - 118, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "name": "three", - "optional": false, - "range": Array [ - 120, - 125, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 111, - 125, - ], - "type": "MemberExpression", - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "name": "four", - "optional": false, - "range": Array [ - 127, - 131, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 111, - 131, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 111, - 131, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 111, - 132, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 134, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processOptional", - "optional": false, - "range": Array [ - 9, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "one", - "optional": true, - "range": Array [ - 25, - 34, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 134, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 135, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 24, - ], - "type": "Identifier", - "value": "processOptional", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 40, - 43, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 43, - 45, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 55, - 57, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 57, - 60, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 61, - 66, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 70, - 73, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 74, - 77, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 77, - 79, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 79, - 84, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 88, - 91, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 91, - 92, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 92, - 95, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 95, - 97, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 97, - 102, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 103, - 107, - ], - "type": "Identifier", - "value": "four", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 111, - 114, - ], - "type": "Identifier", - "value": "one", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 115, - 118, - ], - "type": "Identifier", - "value": "two", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 118, - 120, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 120, - 125, - ], - "type": "Identifier", - "value": "three", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 125, - 127, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 127, - 131, - ], - "type": "Identifier", - "value": "four", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 22, - "line": 6, - }, - }, - "range": Array [ - 131, - 132, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 133, - 134, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/parenthesized-use-strict.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/parenthesized-use-strict.src.ts.shot deleted file mode 100644 index 9f49ca46bda1..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/parenthesized-use-strict.src.ts.shot +++ /dev/null @@ -1,155 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics parenthesized-use-strict.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 46, - 58, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 45, - 60, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "type": "Line", - "value": " this should not be classed as a directive", - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 45, - 60, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 46, - 58, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/private-fields-in-in.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/private-fields-in-in.src.ts.shot deleted file mode 100644 index 384a9c4db144..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/private-fields-in-in.src.ts.shot +++ /dev/null @@ -1,629 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics private-fields-in-in.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "prop1", - "range": Array [ - 14, - 20, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 21, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "method", - "optional": false, - "range": Array [ - 24, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 24, - 67, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "name": "prop1", - "range": Array [ - 49, - 55, - ], - "type": "PrivateIdentifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "operator": "in", - "range": Array [ - 49, - 62, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "name": "arg", - "optional": false, - "range": Array [ - 59, - 62, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 42, - 63, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 36, - 67, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "arg", - "optional": false, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 30, - 67, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 69, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 69, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 70, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "value": "#prop1", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "Identifier", - "value": "method", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "value": "arg", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 49, - 55, - ], - "type": "Identifier", - "value": "#prop1", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 56, - 58, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "range": Array [ - 59, - 62, - ], - "type": "Identifier", - "value": "arg", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/readonly-arrays.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/readonly-arrays.src.ts.shot deleted file mode 100644 index b7b7d0a21c1a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/readonly-arrays.src.ts.shot +++ /dev/null @@ -1,1766 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics readonly-arrays.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "arr", - "optional": false, - "range": Array [ - 45, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "slice", - "optional": false, - "range": Array [ - 49, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 45, - 54, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 45, - 56, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 45, - 57, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 84, - 92, - ], - "raw": "\\"hello!\\"", - "type": "Literal", - "value": "hello!", - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "arr", - "optional": false, - "range": Array [ - 75, - 78, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "push", - "optional": false, - "range": Array [ - 79, - 83, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 75, - 83, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 75, - 93, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 75, - 94, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 106, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "arr", - "optional": false, - "range": Array [ - 13, - 39, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 39, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 39, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "ReadonlyArray", - "optional": false, - "range": Array [ - 18, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSStringKeyword", - }, - ], - "range": Array [ - 31, - 39, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - ], - "range": Array [ - 0, - 106, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "name": "arr", - "optional": false, - "range": Array [ - 149, - 152, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "name": "slice", - "optional": false, - "range": Array [ - 153, - 158, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 149, - 158, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "optional": false, - "range": Array [ - 149, - 160, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 149, - 161, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "range": Array [ - 188, - 196, - ], - "raw": "\\"hello!\\"", - "type": "Literal", - "value": "hello!", - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "name": "arr", - "optional": false, - "range": Array [ - 179, - 182, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 8, - }, - }, - "name": "push", - "optional": false, - "range": Array [ - 183, - 187, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 179, - 187, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "optional": false, - "range": Array [ - 179, - 197, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 179, - 198, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 37, - "line": 6, - }, - }, - "range": Array [ - 145, - 210, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 117, - 120, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "name": "arr", - "optional": false, - "range": Array [ - 121, - 143, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 124, - 143, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "operator": "readonly", - "range": Array [ - 126, - 143, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 6, - }, - "start": Object { - "column": 27, - "line": 6, - }, - }, - "range": Array [ - 135, - 141, - ], - "type": "TSStringKeyword", - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 6, - }, - "start": Object { - "column": 27, - "line": 6, - }, - }, - "range": Array [ - 135, - 143, - ], - "type": "TSArrayType", - }, - }, - }, - }, - ], - "range": Array [ - 108, - 210, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 65, - 72, - ], - "type": "Line", - "value": " okay", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 95, - 104, - ], - "type": "Line", - "value": " error!", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 7, - }, - "start": Object { - "column": 22, - "line": 7, - }, - }, - "range": Array [ - 169, - 176, - ], - "type": "Line", - "value": " okay", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 8, - }, - "start": Object { - "column": 22, - "line": 8, - }, - }, - "range": Array [ - 199, - 208, - ], - "type": "Line", - "value": " error!", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 211, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "arr", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 31, - ], - "type": "Identifier", - "value": "ReadonlyArray", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "Identifier", - "value": "arr", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 49, - 54, - ], - "type": "Identifier", - "value": "slice", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 75, - 78, - ], - "type": "Identifier", - "value": "arr", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 79, - 83, - ], - "type": "Identifier", - "value": "push", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 84, - 92, - ], - "type": "String", - "value": "\\"hello!\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 93, - 94, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 108, - 116, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 117, - 120, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 120, - 121, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 121, - 124, - ], - "type": "Identifier", - "value": "arr", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 126, - 134, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 6, - }, - "start": Object { - "column": 27, - "line": 6, - }, - }, - "range": Array [ - 135, - 141, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 6, - }, - "start": Object { - "column": 33, - "line": 6, - }, - }, - "range": Array [ - 141, - 142, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 6, - }, - "start": Object { - "column": 34, - "line": 6, - }, - }, - "range": Array [ - 142, - 143, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 6, - }, - "start": Object { - "column": 35, - "line": 6, - }, - }, - "range": Array [ - 143, - 144, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 6, - }, - "start": Object { - "column": 37, - "line": 6, - }, - }, - "range": Array [ - 145, - 146, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 149, - 152, - ], - "type": "Identifier", - "value": "arr", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, - }, - }, - "range": Array [ - 152, - 153, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 153, - 158, - ], - "type": "Identifier", - "value": "slice", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 158, - 159, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 159, - 160, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 7, - }, - }, - "range": Array [ - 160, - 161, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 179, - 182, - ], - "type": "Identifier", - "value": "arr", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 8, - }, - "start": Object { - "column": 5, - "line": 8, - }, - }, - "range": Array [ - 182, - 183, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 8, - }, - }, - "range": Array [ - 183, - 187, - ], - "type": "Identifier", - "value": "push", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "range": Array [ - 187, - 188, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "range": Array [ - 188, - 196, - ], - "type": "String", - "value": "\\"hello!\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 8, - }, - "start": Object { - "column": 19, - "line": 8, - }, - }, - "range": Array [ - 196, - 197, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 8, - }, - "start": Object { - "column": 20, - "line": 8, - }, - }, - "range": Array [ - 197, - 198, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 209, - 210, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/readonly-tuples.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/readonly-tuples.src.ts.shot deleted file mode 100644 index 789b6940c55f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/readonly-tuples.src.ts.shot +++ /dev/null @@ -1,1068 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics readonly-tuples.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [ - Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "pair", - "optional": false, - "range": Array [ - 62, - 66, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 67, - 68, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "range": Array [ - 62, - 69, - ], - "type": "MemberExpression", - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "console", - "optional": false, - "range": Array [ - 50, - 57, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "log", - "optional": false, - "range": Array [ - 58, - 61, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 50, - 61, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 50, - 70, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 50, - 71, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": true, - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "pair", - "optional": false, - "range": Array [ - 84, - 88, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 89, - 90, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "range": Array [ - 84, - 91, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "operator": "=", - "range": Array [ - 84, - 102, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 94, - 102, - ], - "raw": "\\"hello!\\"", - "type": "Literal", - "value": "hello!", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 84, - 103, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 118, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "pair", - "optional": false, - "range": Array [ - 13, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "operator": "readonly", - "range": Array [ - 19, - 44, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 43, - ], - "type": "TSStringKeyword", - }, - ], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 44, - ], - "type": "TSTupleType", - }, - }, - }, - }, - ], - "range": Array [ - 0, - 118, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 74, - 81, - ], - "type": "Line", - "value": " okay", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 108, - 116, - ], - "type": "Line", - "value": " error", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 119, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "type": "Identifier", - "value": "pair", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 27, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 43, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 50, - 57, - ], - "type": "Identifier", - "value": "console", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 58, - 61, - ], - "type": "Identifier", - "value": "log", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 62, - 66, - ], - "type": "Identifier", - "value": "pair", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 84, - 88, - ], - "type": "Identifier", - "value": "pair", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 94, - 102, - ], - "type": "String", - "value": "\\"hello!\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-and-and.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-and-and.src.ts.shot deleted file mode 100644 index 6783484bf3e6..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-and-and.src.ts.shot +++ /dev/null @@ -1,177 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics short-circuiting-assignment-and-and.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "||=", - "range": Array [ - 0, - 7, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 5, - ], - "type": "Punctuator", - "value": "||=", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-or-or.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-or-or.src.ts.shot deleted file mode 100644 index 5dabb523118c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-or-or.src.ts.shot +++ /dev/null @@ -1,177 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics short-circuiting-assignment-or-or.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "&&=", - "range": Array [ - 0, - 7, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 5, - ], - "type": "Punctuator", - "value": "&&=", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-question-question.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-question-question.src.ts.shot deleted file mode 100644 index d00f83597a6f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/short-circuiting-assignment-question-question.src.ts.shot +++ /dev/null @@ -1,177 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics short-circuiting-assignment-question-question.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "??=", - "range": Array [ - 0, - 7, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 5, - ], - "type": "Punctuator", - "value": "??=", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/symbol-type-param.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/symbol-type-param.src.ts.shot deleted file mode 100644 index 60577d28b4a1..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/symbol-type-param.src.ts.shot +++ /dev/null @@ -1,471 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics symbol-type-param.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 42, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "abc", - "optional": false, - "range": Array [ - 14, - 38, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 38, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "Map", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "TSSymbolKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSStringKeyword", - }, - ], - "range": Array [ - 22, - 38, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - ], - "range": Array [ - 0, - 42, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "abc", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "Map", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "Identifier", - "value": "symbol", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export-function-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export-function-type.src.ts.shot deleted file mode 100644 index 244d00522769..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export-function-type.src.ts.shot +++ /dev/null @@ -1,412 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-alias-declaration-export-function-type.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "TestCallback", - "optional": false, - "range": Array [ - 12, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "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", - }, - }, - }, - ], - "range": Array [ - 27, - 46, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 46, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - "typeParameters": undefined, - }, - "exportKind": "type", - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 24, - ], - "type": "Identifier", - "value": "TestCallback", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 41, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 46, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export-object-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export-object-type.src.ts.shot deleted file mode 100644 index bce20128d3fa..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export-object-type.src.ts.shot +++ /dev/null @@ -1,366 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-alias-declaration-export-object-type.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "TestClassProps", - "optional": false, - "range": Array [ - 12, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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 { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "count", - "optional": false, - "range": Array [ - 35, - 40, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 35, - 48, - ], - "readonly": false, - "static": false, - "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", - }, - }, - }, - ], - "range": Array [ - 29, - 50, - ], - "type": "TSTypeLiteral", - }, - "typeParameters": undefined, - }, - "exportKind": "type", - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 26, - ], - "type": "Identifier", - "value": "TestClassProps", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 35, - 40, - ], - "type": "Identifier", - "value": "count", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export.src.ts.shot deleted file mode 100644 index f6aa23333390..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-export.src.ts.shot +++ /dev/null @@ -1,285 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-alias-declaration-export.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "TestAlias", - "optional": false, - "range": Array [ - 12, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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": 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", - }, - ], - }, - "typeParameters": undefined, - }, - "exportKind": "type", - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 21, - ], - "type": "Identifier", - "value": "TestAlias", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 39, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts.shot deleted file mode 100644 index b5e6bcb8d2a1..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts.shot +++ /dev/null @@ -1,568 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-alias-declaration-with-constrained-type-parameter.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Result", - "optional": false, - "range": Array [ - 5, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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": 38, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 38, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "Success", - "optional": false, - "range": Array [ - 28, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "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 { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "name": "Failure", - "optional": false, - "range": Array [ - 41, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - }, - "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", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 12, - 24, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 11, - 25, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "type": "Identifier", - "value": "Result", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 35, - ], - "type": "Identifier", - "value": "Success", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 48, - ], - "type": "Identifier", - "value": "Failure", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration.src.ts.shot deleted file mode 100644 index d3804f1e9375..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-declaration.src.ts.shot +++ /dev/null @@ -1,497 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-alias-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Result", - "optional": false, - "range": Array [ - 5, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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": 27, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 27, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "Success", - "optional": false, - "range": Array [ - 17, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 24, - 27, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 37, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "Failure", - "optional": false, - "range": Array [ - 30, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 12, - 13, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 11, - 14, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "type": "Identifier", - "value": "Result", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 24, - ], - "type": "Identifier", - "value": "Success", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 37, - ], - "type": "Identifier", - "value": "Failure", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-object-without-annotation.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-object-without-annotation.src.ts.shot deleted file mode 100644 index 545a5e2b59f7..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-alias-object-without-annotation.src.ts.shot +++ /dev/null @@ -1,409 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-alias-object-without-annotation.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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 { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 12, - 24, - ], - "readonly": false, - "static": false, - "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", - }, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 25, - 28, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 11, - 29, - ], - "type": "TSTypeLiteral", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 23, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-arrow-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-arrow-function.src.ts.shot deleted file mode 100644 index 61082763c66d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-arrow-function.src.ts.shot +++ /dev/null @@ -1,529 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-assertion-in-arrow-function.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "assertString", - "optional": false, - "range": Array [ - 6, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 50, - 56, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 58, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 21, - 58, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 40, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": true, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "parameterName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 31, - 40, - ], - "type": "TSTypePredicate", - "typeAnnotation": null, - }, - }, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 58, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 58, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 59, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 18, - ], - "type": "Identifier", - "value": "assertString", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 43, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 50, - 56, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-function.src.ts.shot deleted file mode 100644 index a9cebd20e869..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-function.src.ts.shot +++ /dev/null @@ -1,454 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-assertion-in-function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 48, - 54, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 56, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "assertsString", - "optional": false, - "range": Array [ - 9, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 23, - 29, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 29, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 56, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 41, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": true, - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "parameterName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 32, - 41, - ], - "type": "TSTypePredicate", - "typeAnnotation": null, - }, - }, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 57, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 22, - ], - "type": "Identifier", - "value": "assertsString", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 39, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 48, - 54, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-interface.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-interface.src.ts.shot deleted file mode 100644 index efcdd6e5e9aa..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-interface.src.ts.shot +++ /dev/null @@ -1,498 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-assertion-in-interface.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "isString", - "optional": false, - "range": Array [ - 24, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "node", - "optional": false, - "range": Array [ - 33, - 42, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 37, - 42, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 24, - 58, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 43, - 57, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": true, - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "parameterName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "name": "node", - "optional": false, - "range": Array [ - 53, - 57, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 45, - 57, - ], - "type": "TSTypePredicate", - "typeAnnotation": null, - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 60, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "AssertFoo", - "optional": false, - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 60, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 61, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - "value": "AssertFoo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 24, - 32, - ], - "type": "Identifier", - "value": "isString", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "Identifier", - "value": "node", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 45, - 52, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 53, - 57, - ], - "type": "Identifier", - "value": "node", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot deleted file mode 100644 index c84fa6d40fa5..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot +++ /dev/null @@ -1,880 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-assertion-in-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "isBar", - "optional": false, - "range": Array [ - 21, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 21, - 60, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 49, - 56, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 43, - 60, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 26, - 60, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 28, - 42, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": true, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "parameterName": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 38, - 42, - ], - "type": "TSThisType", - }, - "range": Array [ - 30, - 42, - ], - "type": "TSTypePredicate", - "typeAnnotation": null, - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "isBaz", - "optional": false, - "range": Array [ - 63, - 68, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 63, - 108, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 97, - 104, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "range": Array [ - 91, - 108, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "params": Array [], - "range": Array [ - 71, - 108, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 73, - 87, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": true, - "loc": Object { - "end": Object { - "column": 26, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "parameterName": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 83, - 87, - ], - "type": "TSThisType", - }, - "range": Array [ - 75, - 87, - ], - "type": "TSTypePredicate", - "typeAnnotation": null, - }, - }, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 110, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "AssertsFoo", - "optional": false, - "range": Array [ - 6, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 110, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 111, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 16, - ], - "type": "Identifier", - "value": "AssertsFoo", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 21, - 26, - ], - "type": "Identifier", - "value": "isBar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 30, - 37, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 38, - 42, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 49, - 55, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 63, - 68, - ], - "type": "Identifier", - "value": "isBaz", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 75, - 82, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 83, - 87, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 5, - }, - "start": Object { - "column": 27, - "line": 5, - }, - }, - "range": Array [ - 88, - 90, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "range": Array [ - 91, - 92, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 97, - 103, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-arrow-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-arrow-function.src.ts.shot deleted file mode 100644 index 2b0109966c69..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-arrow-function.src.ts.shot +++ /dev/null @@ -1,598 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-assertion-with-guard-in-arrow-function.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "assertString", - "optional": false, - "range": Array [ - 6, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 60, - 66, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 54, - "line": 1, - }, - }, - "range": Array [ - 54, - 68, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 21, - 68, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 50, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": true, - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "parameterName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 31, - 50, - ], - "type": "TSTypePredicate", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "TSStringKeyword", - }, - }, - }, - }, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 68, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 68, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 69, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 18, - ], - "type": "Identifier", - "value": "assertString", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 43, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "range": Array [ - 51, - 53, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 54, - "line": 1, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 60, - 66, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-function.src.ts.shot deleted file mode 100644 index 639bad6d9bcc..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-function.src.ts.shot +++ /dev/null @@ -1,523 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-assertion-with-guard-in-function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 63, - 69, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 71, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "assertsStringGuard", - "optional": false, - "range": Array [ - 9, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 28, - 34, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 71, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 56, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": true, - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "parameterName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 37, - 56, - ], - "type": "TSTypePredicate", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "range": Array [ - 50, - 56, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "range": Array [ - 50, - 56, - ], - "type": "TSStringKeyword", - }, - }, - }, - }, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 72, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 27, - ], - "type": "Identifier", - "value": "assertsStringGuard", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 44, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 49, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "range": Array [ - 50, - 56, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 63, - 69, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-interface.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-interface.src.ts.shot deleted file mode 100644 index 7b1f554558a9..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-interface.src.ts.shot +++ /dev/null @@ -1,567 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-assertion-with-guard-in-interface.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "isString", - "optional": false, - "range": Array [ - 24, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "node", - "optional": false, - "range": Array [ - 33, - 42, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 37, - 42, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 24, - 68, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 43, - 67, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": true, - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "parameterName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "name": "node", - "optional": false, - "range": Array [ - 53, - 57, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 45, - 67, - ], - "type": "TSTypePredicate", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 39, - "line": 2, - }, - }, - "range": Array [ - 61, - 67, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 39, - "line": 2, - }, - }, - "range": Array [ - 61, - 67, - ], - "type": "TSStringKeyword", - }, - }, - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 70, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "AssertFoo", - "optional": false, - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 70, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 71, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - "value": "AssertFoo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 24, - 32, - ], - "type": "Identifier", - "value": "isString", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "Identifier", - "value": "node", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 45, - 52, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 53, - 57, - ], - "type": "Identifier", - "value": "node", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 58, - 60, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 39, - "line": 2, - }, - }, - "range": Array [ - 61, - 67, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 45, - "line": 2, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot deleted file mode 100644 index 4b8449944b0f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot +++ /dev/null @@ -1,1018 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-assertion-with-guard-in-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "isBar", - "optional": false, - "range": Array [ - 21, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 21, - 70, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 59, - 66, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 53, - 70, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 26, - 70, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 28, - 52, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": true, - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "parameterName": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 38, - 42, - ], - "type": "TSThisType", - }, - "range": Array [ - 30, - 52, - ], - "type": "TSTypePredicate", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "TSStringKeyword", - }, - }, - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "isBaz", - "optional": false, - "range": Array [ - 73, - 78, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 73, - 128, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 117, - 124, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 111, - 128, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "params": Array [], - "range": Array [ - 81, - 128, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 83, - 107, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": true, - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "parameterName": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 93, - 97, - ], - "type": "TSThisType", - }, - "range": Array [ - 85, - 107, - ], - "type": "TSTypePredicate", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "range": Array [ - 101, - 107, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "range": Array [ - 101, - 107, - ], - "type": "TSStringKeyword", - }, - }, - }, - }, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 130, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "AssertsFoo", - "optional": false, - "range": Array [ - 6, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 130, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 131, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 16, - ], - "type": "Identifier", - "value": "AssertsFoo", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 21, - 26, - ], - "type": "Identifier", - "value": "isBar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 30, - 37, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 38, - 42, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 43, - 45, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 59, - 65, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 73, - 78, - ], - "type": "Identifier", - "value": "isBaz", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 85, - 92, - ], - "type": "Identifier", - "value": "asserts", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 93, - 97, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 5, - }, - "start": Object { - "column": 27, - "line": 5, - }, - }, - "range": Array [ - 98, - 100, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "range": Array [ - 101, - 107, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "range": Array [ - 108, - 110, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 5, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 117, - 123, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 123, - 124, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 127, - 128, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 129, - 130, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-arrow-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-arrow-function.src.ts.shot deleted file mode 100644 index c4389a3250a2..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-arrow-function.src.ts.shot +++ /dev/null @@ -1,728 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-guard-in-arrow-function.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "isString", - "optional": false, - "range": Array [ - 6, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 62, - 63, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "operator": "typeof", - "prefix": true, - "range": Array [ - 55, - 63, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "operator": "===", - "range": Array [ - 55, - 76, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 68, - 76, - ], - "raw": "'string'", - "type": "Literal", - "value": "string", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 48, - 76, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 78, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 18, - 24, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 17, - 78, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": false, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "parameterName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 27, - 38, - ], - "type": "TSTypePredicate", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSStringKeyword", - }, - }, - }, - }, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 78, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 78, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 79, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "Identifier", - "value": "isString", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 41, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 48, - 54, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 64, - 67, - ], - "type": "Punctuator", - "value": "===", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 68, - 76, - ], - "type": "String", - "value": "'string'", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-function.src.ts.shot deleted file mode 100644 index c4827039bed1..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-function.src.ts.shot +++ /dev/null @@ -1,653 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-guard-in-function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "operator": "typeof", - "prefix": true, - "range": Array [ - 52, - 60, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "operator": "===", - "range": Array [ - 52, - 73, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 65, - 73, - ], - "raw": "'string'", - "type": "Literal", - "value": "string", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 45, - 73, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 75, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "isString", - "optional": false, - "range": Array [ - 9, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 18, - 24, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 0, - 75, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": false, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "parameterName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 27, - 38, - ], - "type": "TSTypePredicate", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSStringKeyword", - }, - }, - }, - }, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 75, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 17, - ], - "type": "Identifier", - "value": "isString", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 45, - 51, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 52, - 58, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 61, - 64, - ], - "type": "Punctuator", - "value": "===", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 65, - 73, - ], - "type": "String", - "value": "'string'", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-interface.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-interface.src.ts.shot deleted file mode 100644 index 760f643e1b7d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-interface.src.ts.shot +++ /dev/null @@ -1,549 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-guard-in-interface.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "isString", - "optional": false, - "range": Array [ - 18, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "node", - "optional": false, - "range": Array [ - 27, - 36, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 33, - 36, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 18, - 54, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 37, - 53, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": false, - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "parameterName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "node", - "optional": false, - "range": Array [ - 39, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 39, - 53, - ], - "type": "TSTypePredicate", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 47, - 53, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 47, - 53, - ], - "type": "TSStringKeyword", - }, - }, - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 56, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 56, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 57, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 26, - ], - "type": "Identifier", - "value": "isString", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "Identifier", - "value": "node", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 33, - 36, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 39, - 43, - ], - "type": "Identifier", - "value": "node", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 44, - 46, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 47, - 53, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 37, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot deleted file mode 100644 index 76405ed66131..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot +++ /dev/null @@ -1,1200 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-guard-in-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "isBar", - "optional": false, - "range": Array [ - 14, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 75, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 51, - 55, - ], - "type": "ThisExpression", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "operator": "instanceof", - "range": Array [ - 51, - 70, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 67, - 70, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 44, - 71, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 75, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 19, - 75, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 21, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "parameterName": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 23, - 27, - ], - "type": "TSThisType", - }, - "range": Array [ - 23, - 37, - ], - "type": "TSTypePredicate", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSStringKeyword", - }, - }, - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "name": "isBaz", - "optional": false, - "range": Array [ - 78, - 83, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 78, - 145, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 121, - 125, - ], - "type": "ThisExpression", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "operator": "instanceof", - "range": Array [ - 121, - 140, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 6, - }, - "start": Object { - "column": 27, - "line": 6, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 137, - 140, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 114, - 141, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 32, - "line": 5, - }, - }, - "range": Array [ - 108, - 145, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "params": Array [], - "range": Array [ - 86, - 145, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 88, - 104, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "asserts": false, - "loc": Object { - "end": Object { - "column": 28, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "parameterName": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 90, - 94, - ], - "type": "TSThisType", - }, - "range": Array [ - 90, - 104, - ], - "type": "TSTypePredicate", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 98, - 104, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 98, - 104, - ], - "type": "TSStringKeyword", - }, - }, - }, - }, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 147, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 147, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 148, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "type": "Identifier", - "value": "isBar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 23, - 27, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 51, - 55, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 56, - 66, - ], - "type": "Keyword", - "value": "instanceof", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "range": Array [ - 67, - 70, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 78, - 83, - ], - "type": "Identifier", - "value": "isBaz", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 5, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 87, - 88, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 90, - 94, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 95, - 97, - ], - "type": "Identifier", - "value": "is", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 98, - 104, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 5, - }, - "start": Object { - "column": 29, - "line": 5, - }, - }, - "range": Array [ - 105, - 107, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 5, - }, - "start": Object { - "column": 32, - "line": 5, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 114, - 120, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 121, - 125, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 126, - 136, - ], - "type": "Keyword", - "value": "instanceof", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 6, - }, - "start": Object { - "column": 27, - "line": 6, - }, - }, - "range": Array [ - 137, - 140, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 6, - }, - "start": Object { - "column": 30, - "line": 6, - }, - }, - "range": Array [ - 140, - 141, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 2, - "line": 7, - }, - }, - "range": Array [ - 144, - 145, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 146, - 147, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-import-type-with-type-parameters-in-type-reference.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-import-type-with-type-parameters-in-type-reference.src.ts.shot deleted file mode 100644 index 78569c9d383e..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-import-type-with-type-parameters-in-type-reference.src.ts.shot +++ /dev/null @@ -1,522 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-import-type-with-type-parameters-in-type-reference.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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 { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "argument": 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", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "qualifier": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "TSAnyKeyword", - }, - ], - "range": Array [ - 23, - 28, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "range": Array [ - 10, - 29, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "String", - "value": "\\"\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-import-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-import-type.src.ts.shot deleted file mode 100644 index 3da18228ba41..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-import-type.src.ts.shot +++ /dev/null @@ -1,708 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-import-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "exprName": Object { - "argument": 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", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "qualifier": null, - "range": Array [ - 16, - 27, - ], - "type": "TSImportType", - "typeParameters": null, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 27, - ], - "type": "TSTypeQuery", - "typeParameters": undefined, - }, - "typeParameters": undefined, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 29, - 55, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "argument": 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", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "qualifier": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "Y", - "optional": false, - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 51, - 54, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 56, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "String", - "value": "'A'", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 29, - 33, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "String", - "value": "'B'", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - "value": "Y", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-only-export-specifiers.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-only-export-specifiers.src.ts.shot deleted file mode 100644 index fd0197325f6f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-only-export-specifiers.src.ts.shot +++ /dev/null @@ -1,386 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-only-export-specifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 36, - ], - "raw": "\\"mod\\"", - "type": "Literal", - "value": "mod", - }, - "specifiers": Array [ - Object { - "exportKind": "type", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 9, - 15, - ], - "type": "ExportSpecifier", - }, - Object { - "exportKind": "type", - "exported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 17, - 23, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 36, - ], - "type": "String", - "value": "\\"mod\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-only-import-specifiers.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-only-import-specifiers.src.ts.shot deleted file mode 100644 index e250bf09a4e5..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-only-import-specifiers.src.ts.shot +++ /dev/null @@ -1,385 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-only-import-specifiers.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 36, - ], - "raw": "\\"mod\\"", - "type": "Literal", - "value": "mod", - }, - "specifiers": Array [ - Object { - "importKind": "type", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 9, - 15, - ], - "type": "ImportSpecifier", - }, - Object { - "importKind": "type", - "imported": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 17, - 23, - ], - "type": "ImportSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 36, - ], - "type": "String", - "value": "\\"mod\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-parameters-comments-heritage.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-parameters-comments-heritage.src.ts.shot deleted file mode 100644 index ae6510407f65..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-parameters-comments-heritage.src.ts.shot +++ /dev/null @@ -1,2190 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-parameters-comments-heritage.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 74, - "line": 1, - }, - "start": Object { - "column": 72, - "line": 1, - }, - }, - "range": Array [ - 72, - 74, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 74, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 74, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 43, - 46, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": Object { - "loc": Object { - "end": Object { - "column": 71, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 60, - "line": 1, - }, - "start": Object { - "column": 59, - "line": 1, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 60, - "line": 1, - }, - "start": Object { - "column": 59, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 47, - 71, - ], - "type": "TSTypeParameterInstantiation", - }, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 22, - 23, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 10, - 34, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 89, - "line": 2, - }, - "start": Object { - "column": 87, - "line": 2, - }, - }, - "range": Array [ - 162, - 164, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "foo2", - "optional": false, - "range": Array [ - 81, - 85, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 89, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 75, - 164, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 61, - "line": 2, - }, - "start": Object { - "column": 58, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 133, - 136, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": Object { - "loc": Object { - "end": Object { - "column": 86, - "line": 2, - }, - "start": Object { - "column": 62, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 75, - "line": 2, - }, - "start": Object { - "column": 74, - "line": 2, - }, - }, - "range": Array [ - 149, - 150, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 75, - "line": 2, - }, - "start": Object { - "column": 74, - "line": 2, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 149, - 150, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 137, - 161, - ], - "type": "TSTypeParameterInstantiation", - }, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 37, - "line": 2, - }, - }, - "range": Array [ - 112, - 113, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 37, - "line": 2, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "TSLiteralType", - }, - "in": false, - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 98, - 99, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 98, - 113, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 86, - 124, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 79, - "line": 3, - }, - "start": Object { - "column": 77, - "line": 3, - }, - }, - "range": Array [ - 242, - 244, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 51, - "line": 3, - }, - "start": Object { - "column": 47, - "line": 3, - }, - }, - "name": "bar2", - "optional": false, - "range": Array [ - 212, - 216, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 76, - "line": 3, - }, - "start": Object { - "column": 47, - "line": 3, - }, - }, - "range": Array [ - 212, - 241, - ], - "type": "TSInterfaceHeritage", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 76, - "line": 3, - }, - "start": Object { - "column": 52, - "line": 3, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 3, - }, - "start": Object { - "column": 64, - "line": 3, - }, - }, - "range": Array [ - 229, - 230, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 65, - "line": 3, - }, - "start": Object { - "column": 64, - "line": 3, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 229, - 230, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 217, - 241, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 175, - 178, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 79, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 165, - 244, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 191, - 192, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 191, - 192, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 179, - 203, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 93, - "line": 4, - }, - "start": Object { - "column": 91, - "line": 4, - }, - }, - "range": Array [ - 336, - 338, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 65, - "line": 4, - }, - "start": Object { - "column": 62, - "line": 4, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 307, - 310, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 90, - "line": 4, - }, - "start": Object { - "column": 62, - "line": 4, - }, - }, - "range": Array [ - 307, - 335, - ], - "type": "TSInterfaceHeritage", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 90, - "line": 4, - }, - "start": Object { - "column": 66, - "line": 4, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 4, - }, - "start": Object { - "column": 78, - "line": 4, - }, - }, - "range": Array [ - 323, - 324, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 79, - "line": 4, - }, - "start": Object { - "column": 78, - "line": 4, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 323, - 324, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 311, - 335, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "name": "bar2", - "optional": false, - "range": Array [ - 255, - 259, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 93, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 245, - 338, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 41, - "line": 4, - }, - }, - "range": Array [ - 286, - 287, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 41, - "line": 4, - }, - }, - "range": Array [ - 286, - 287, - ], - "type": "TSLiteralType", - }, - "in": false, - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 272, - 273, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 272, - 287, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 260, - 298, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 21, - ], - "type": "Block", - "value": " aaa ", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 33, - ], - "type": "Block", - "value": " bbb ", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 58, - ], - "type": "Block", - "value": " aaa ", - }, - Object { - "loc": Object { - "end": Object { - "column": 70, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "range": Array [ - 61, - 70, - ], - "type": "Block", - "value": " bbb ", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 88, - 97, - ], - "type": "Block", - "value": " aaa ", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 100, - 109, - ], - "type": "Block", - "value": " bbb ", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 39, - "line": 2, - }, - }, - "range": Array [ - 114, - 123, - ], - "type": "Block", - "value": " bbb ", - }, - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 2, - }, - "start": Object { - "column": 64, - "line": 2, - }, - }, - "range": Array [ - 139, - 148, - ], - "type": "Block", - "value": " aaa ", - }, - Object { - "loc": Object { - "end": Object { - "column": 85, - "line": 2, - }, - "start": Object { - "column": 76, - "line": 2, - }, - }, - "range": Array [ - 151, - 160, - ], - "type": "Block", - "value": " bbb ", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 181, - 190, - ], - "type": "Block", - "value": " aaa ", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 193, - 202, - ], - "type": "Block", - "value": " bbb ", - }, - Object { - "loc": Object { - "end": Object { - "column": 63, - "line": 3, - }, - "start": Object { - "column": 54, - "line": 3, - }, - }, - "range": Array [ - 219, - 228, - ], - "type": "Block", - "value": " aaa ", - }, - Object { - "loc": Object { - "end": Object { - "column": 75, - "line": 3, - }, - "start": Object { - "column": 66, - "line": 3, - }, - }, - "range": Array [ - 231, - 240, - ], - "type": "Block", - "value": " bbb ", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 262, - 271, - ], - "type": "Block", - "value": " aaa ", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 29, - "line": 4, - }, - }, - "range": Array [ - 274, - 283, - ], - "type": "Block", - "value": " bbb ", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 4, - }, - "start": Object { - "column": 43, - "line": 4, - }, - }, - "range": Array [ - 288, - 297, - ], - "type": "Block", - "value": " bbb ", - }, - Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 4, - }, - "start": Object { - "column": 68, - "line": 4, - }, - }, - "range": Array [ - 313, - 322, - ], - "type": "Block", - "value": " aaa ", - }, - Object { - "loc": Object { - "end": Object { - "column": 89, - "line": 4, - }, - "start": Object { - "column": 80, - "line": 4, - }, - }, - "range": Array [ - 325, - 334, - ], - "type": "Block", - "value": " bbb ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 339, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 42, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 46, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 60, - "line": 1, - }, - "start": Object { - "column": 59, - "line": 1, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 71, - "line": 1, - }, - "start": Object { - "column": 70, - "line": 1, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 1, - }, - "start": Object { - "column": 72, - "line": 1, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 1, - }, - "start": Object { - "column": 73, - "line": 1, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 75, - 80, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 81, - 85, - ], - "type": "Identifier", - "value": "foo2", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 37, - "line": 2, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 2, - }, - "start": Object { - "column": 48, - "line": 2, - }, - }, - "range": Array [ - 123, - 124, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 50, - "line": 2, - }, - }, - "range": Array [ - 125, - 132, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 2, - }, - "start": Object { - "column": 58, - "line": 2, - }, - }, - "range": Array [ - 133, - 136, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 63, - "line": 2, - }, - "start": Object { - "column": 62, - "line": 2, - }, - }, - "range": Array [ - 137, - 138, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 75, - "line": 2, - }, - "start": Object { - "column": 74, - "line": 2, - }, - }, - "range": Array [ - 149, - 150, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 86, - "line": 2, - }, - "start": Object { - "column": 85, - "line": 2, - }, - }, - "range": Array [ - 160, - 161, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 88, - "line": 2, - }, - "start": Object { - "column": 87, - "line": 2, - }, - }, - "range": Array [ - 162, - 163, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 89, - "line": 2, - }, - "start": Object { - "column": 88, - "line": 2, - }, - }, - "range": Array [ - 163, - 164, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 165, - 174, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 175, - 178, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 179, - 180, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 191, - 192, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 3, - }, - "start": Object { - "column": 37, - "line": 3, - }, - }, - "range": Array [ - 202, - 203, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 3, - }, - }, - "range": Array [ - 204, - 211, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 3, - }, - "start": Object { - "column": 47, - "line": 3, - }, - }, - "range": Array [ - 212, - 216, - ], - "type": "Identifier", - "value": "bar2", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 3, - }, - "start": Object { - "column": 52, - "line": 3, - }, - }, - "range": Array [ - 217, - 218, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 3, - }, - "start": Object { - "column": 64, - "line": 3, - }, - }, - "range": Array [ - 229, - 230, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 76, - "line": 3, - }, - "start": Object { - "column": 75, - "line": 3, - }, - }, - "range": Array [ - 240, - 241, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 78, - "line": 3, - }, - "start": Object { - "column": 77, - "line": 3, - }, - }, - "range": Array [ - 242, - 243, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 3, - }, - "start": Object { - "column": 78, - "line": 3, - }, - }, - "range": Array [ - 243, - 244, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 245, - 254, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 255, - 259, - ], - "type": "Identifier", - "value": "bar2", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 260, - 261, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 272, - 273, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 39, - "line": 4, - }, - }, - "range": Array [ - 284, - 285, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 41, - "line": 4, - }, - }, - "range": Array [ - 286, - 287, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 4, - }, - "start": Object { - "column": 52, - "line": 4, - }, - }, - "range": Array [ - 297, - 298, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 4, - }, - "start": Object { - "column": 54, - "line": 4, - }, - }, - "range": Array [ - 299, - 306, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 4, - }, - "start": Object { - "column": 62, - "line": 4, - }, - }, - "range": Array [ - 307, - 310, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 67, - "line": 4, - }, - "start": Object { - "column": 66, - "line": 4, - }, - }, - "range": Array [ - 311, - 312, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 4, - }, - "start": Object { - "column": 78, - "line": 4, - }, - }, - "range": Array [ - 323, - 324, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 90, - "line": 4, - }, - "start": Object { - "column": 89, - "line": 4, - }, - }, - "range": Array [ - 334, - 335, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 92, - "line": 4, - }, - "start": Object { - "column": 91, - "line": 4, - }, - }, - "range": Array [ - 336, - 337, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 93, - "line": 4, - }, - "start": Object { - "column": 92, - "line": 4, - }, - }, - "range": Array [ - 337, - 338, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-parameters-comments.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-parameters-comments.src.ts.shot deleted file mode 100644 index 506d536cab3c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-parameters-comments.src.ts.shot +++ /dev/null @@ -1,1022 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-parameters-comments.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 42, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 3, - 40, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "type": "ExpressionStatement", - }, - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "range": Array [ - 84, - 87, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 53, - 56, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 44, - 87, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 68, - 69, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 56, - 81, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 46, - "line": 3, - }, - }, - "range": Array [ - 134, - 137, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 97, - 100, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 88, - 137, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "range": Array [ - 126, - 129, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 126, - 129, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "in": false, - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 112, - 113, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 112, - 129, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 100, - 131, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 20, - ], - "type": "Block", - "value": " comment 1 ", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 38, - ], - "type": "Block", - "value": " comment 2 ", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 58, - 67, - ], - "type": "Block", - "value": " aaa ", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 70, - 79, - ], - "type": "Block", - "value": " bbb ", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 102, - 111, - ], - "type": "Block", - "value": " aaa ", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 114, - 123, - ], - "type": "Block", - "value": " bbb ", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 138, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 44, - 52, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 53, - 56, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 37, - "line": 2, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 88, - 96, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 97, - 100, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 100, - 101, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "range": Array [ - 126, - 129, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 42, - "line": 3, - }, - }, - "range": Array [ - 130, - 131, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 3, - }, - "start": Object { - "column": 43, - "line": 3, - }, - }, - "range": Array [ - 131, - 132, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 44, - "line": 3, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 46, - "line": 3, - }, - }, - "range": Array [ - 134, - 135, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 48, - "line": 3, - }, - }, - "range": Array [ - 136, - 137, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot deleted file mode 100644 index 97b337b9834d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot +++ /dev/null @@ -1,521 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics type-reference-comments.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "mBuffers", - "optional": false, - "range": Array [ - 26, - 34, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 51, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 26, - 75, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 34, - 74, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 36, - 74, - ], - "type": "TSTypeReference", - "typeName": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "interop", - "optional": false, - "range": Array [ - 36, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 36, - 53, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "name": "Reference", - "optional": false, - "range": Array [ - 44, - 53, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "TSQualifiedName", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 54, - 57, - ], - "type": "TSAnyKeyword", - }, - ], - "range": Array [ - 53, - 74, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 77, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "AudioBufferList", - "optional": false, - "range": Array [ - 6, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 77, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 58, - 73, - ], - "type": "Block", - "value": "AudioBuffer", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 78, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 21, - ], - "type": "Identifier", - "value": "AudioBufferList", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 26, - 34, - ], - "type": "Identifier", - "value": "mBuffers", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 36, - 43, - ], - "type": "Identifier", - "value": "interop", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 44, - 53, - ], - "type": "Identifier", - "value": "Reference", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 54, - 57, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 2, - }, - "start": Object { - "column": 49, - "line": 2, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 2, - }, - "start": Object { - "column": 50, - "line": 2, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-bigint.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-bigint.src.ts.shot deleted file mode 100644 index 16718475226b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-bigint.src.ts.shot +++ /dev/null @@ -1,156 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-bigint.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSBigIntKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "bigint", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-boolean.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-boolean.src.ts.shot deleted file mode 100644 index 6bae375246c5..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-boolean.src.ts.shot +++ /dev/null @@ -1,156 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-boolean.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 18, - ], - "type": "TSBooleanKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 18, - ], - "type": "Identifier", - "value": "boolean", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-false.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-false.src.ts.shot deleted file mode 100644 index cd61063d33c4..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-false.src.ts.shot +++ /dev/null @@ -1,175 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-false.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "type": "TSLiteralType", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "type": "Boolean", - "value": "false", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-never.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-never.src.ts.shot deleted file mode 100644 index 2ef2bc7ac885..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-never.src.ts.shot +++ /dev/null @@ -1,156 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-never.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "type": "TSNeverKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "type": "Identifier", - "value": "never", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-null.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-null.src.ts.shot deleted file mode 100644 index 3063803b21a6..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-null.src.ts.shot +++ /dev/null @@ -1,156 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-null.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 15, - ], - "type": "TSNullKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 15, - ], - "type": "Keyword", - "value": "null", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-number.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-number.src.ts.shot deleted file mode 100644 index 136af862576c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-number.src.ts.shot +++ /dev/null @@ -1,156 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-number.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSNumberKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "number", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-object.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-object.src.ts.shot deleted file mode 100644 index 93ff86192754..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-object.src.ts.shot +++ /dev/null @@ -1,156 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-object.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSObjectKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "object", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-string.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-string.src.ts.shot deleted file mode 100644 index ef939b6e06d8..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-string.src.ts.shot +++ /dev/null @@ -1,156 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-string.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSStringKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "string", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-symbol.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-symbol.src.ts.shot deleted file mode 100644 index 293287d670bd..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-symbol.src.ts.shot +++ /dev/null @@ -1,156 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-symbol.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSSymbolKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "symbol", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-true.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-true.src.ts.shot deleted file mode 100644 index 6c85c788933d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-true.src.ts.shot +++ /dev/null @@ -1,175 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-true.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 15, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 15, - ], - "type": "TSLiteralType", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 15, - ], - "type": "Boolean", - "value": "true", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-undefined.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-undefined.src.ts.shot deleted file mode 100644 index 83bce206ac97..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-undefined.src.ts.shot +++ /dev/null @@ -1,156 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-undefined.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 20, - ], - "type": "TSUndefinedKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 20, - ], - "type": "Identifier", - "value": "undefined", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-unknown.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-unknown.src.ts.shot deleted file mode 100644 index b32a66f87d39..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-unknown.src.ts.shot +++ /dev/null @@ -1,156 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-unknown.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 18, - ], - "type": "TSUnknownKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 18, - ], - "type": "Identifier", - "value": "unknown", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-void.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-void.src.ts.shot deleted file mode 100644 index 3ba4accdf4fd..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-keyword-void.src.ts.shot +++ /dev/null @@ -1,156 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-keyword-void.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 15, - ], - "type": "TSVoidKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 15, - ], - "type": "Keyword", - "value": "void", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-method-signature.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-method-signature.src.ts.shot deleted file mode 100644 index 252f85afc2ca..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-method-signature.src.ts.shot +++ /dev/null @@ -1,930 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-method-signature.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 57, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "members": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "h", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 17, - 28, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 20, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 15, - 36, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 31, - 35, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "g", - "optional": false, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 44, - 50, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 47, - 50, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 49, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 39, - 55, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 51, - 54, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 41, - 42, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 41, - 42, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 40, - 43, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "range": Array [ - 11, - 57, - ], - "type": "TSTypeLiteral", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 58, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "h", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 31, - 35, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - "value": "g", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 44, - 47, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-this.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-this.src.ts.shot deleted file mode 100644 index cd43c09cf0b8..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-this.src.ts.shot +++ /dev/null @@ -1,804 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics typed-this.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "name": "addClickListener", - "optional": false, - "range": Array [ - 23, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 65, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "onclick", - "optional": false, - "range": Array [ - 40, - 79, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 47, - 79, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "name": "this", - "optional": false, - "range": Array [ - 50, - 60, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 54, - 60, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 56, - 60, - ], - "type": "TSVoidKeyword", - }, - }, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "name": "e", - "optional": false, - "range": Array [ - 62, - 70, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 63, - 70, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 43, - "line": 2, - }, - }, - "range": Array [ - 65, - 70, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 43, - "line": 2, - }, - }, - "name": "Event", - "optional": false, - "range": Array [ - 65, - 70, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 49, - 79, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 50, - "line": 2, - }, - }, - "range": Array [ - 72, - 79, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 53, - "line": 2, - }, - }, - "range": Array [ - 75, - 79, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 23, - 87, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 2, - }, - "start": Object { - "column": 58, - "line": 2, - }, - }, - "range": Array [ - 80, - 86, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 2, - }, - "start": Object { - "column": 60, - "line": 2, - }, - }, - "range": Array [ - 82, - 86, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 89, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "UIElement", - "optional": false, - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 89, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 90, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - "value": "UIElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 23, - 39, - ], - "type": "Identifier", - "value": "addClickListener", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 40, - 47, - ], - "type": "Identifier", - "value": "onclick", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 50, - 54, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 56, - 60, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 43, - "line": 2, - }, - }, - "range": Array [ - 65, - 70, - ], - "type": "Identifier", - "value": "Event", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 2, - }, - "start": Object { - "column": 48, - "line": 2, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 2, - }, - "start": Object { - "column": 50, - "line": 2, - }, - }, - "range": Array [ - 72, - 74, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 53, - "line": 2, - }, - }, - "range": Array [ - 75, - 79, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 2, - }, - "start": Object { - "column": 57, - "line": 2, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 58, - "line": 2, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 2, - }, - "start": Object { - "column": 60, - "line": 2, - }, - }, - "range": Array [ - 82, - 86, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 2, - }, - "start": Object { - "column": 64, - "line": 2, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/union-intersection.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/union-intersection.src.ts.shot deleted file mode 100644 index dd98a273ca81..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/union-intersection.src.ts.shot +++ /dev/null @@ -1,2109 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics union-intersection.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "union", - "optional": false, - "range": Array [ - 4, - 36, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 36, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "TSNullKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 36, - ], - "type": "TSUndefinedKeyword", - }, - ], - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 36, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "intersection", - "optional": false, - "range": Array [ - 42, - 71, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 54, - 71, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 56, - 71, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 56, - 62, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 65, - 71, - ], - "type": "TSStringKeyword", - }, - ], - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 42, - 71, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 38, - 72, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "precedence1", - "optional": false, - "range": Array [ - 77, - 115, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 88, - 115, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 90, - 115, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 90, - 96, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 99, - 115, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 99, - 105, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 35, - "line": 3, - }, - }, - "range": Array [ - 108, - 115, - ], - "type": "TSBooleanKeyword", - }, - ], - }, - ], - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 77, - 115, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 73, - 116, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "precedence2", - "optional": false, - "range": Array [ - 121, - 159, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 132, - 159, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 134, - 159, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 134, - 149, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 134, - 140, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 143, - 149, - ], - "type": "TSStringKeyword", - }, - ], - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 4, - }, - }, - "range": Array [ - 152, - 159, - ], - "type": "TSBooleanKeyword", - }, - ], - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 121, - 159, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 43, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 117, - 160, - ], - "type": "VariableDeclaration", - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "name": "unionLeading", - "optional": false, - "range": Array [ - 167, - 179, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 162, - 200, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 6, - }, - "start": Object { - "column": 20, - "line": 6, - }, - }, - "range": Array [ - 182, - 199, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 6, - }, - "start": Object { - "column": 22, - "line": 6, - }, - }, - "range": Array [ - 184, - 190, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 6, - }, - "start": Object { - "column": 31, - "line": 6, - }, - }, - "range": Array [ - 193, - 199, - ], - "type": "TSStringKeyword", - }, - ], - }, - "typeParameters": undefined, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, - }, - }, - "name": "intersectionLeading", - "optional": false, - "range": Array [ - 206, - 225, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 201, - 246, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 7, - }, - "start": Object { - "column": 27, - "line": 7, - }, - }, - "range": Array [ - 228, - 245, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 7, - }, - "start": Object { - "column": 29, - "line": 7, - }, - }, - "range": Array [ - 230, - 245, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 7, - }, - "start": Object { - "column": 29, - "line": 7, - }, - }, - "range": Array [ - 230, - 236, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 7, - }, - "start": Object { - "column": 38, - "line": 7, - }, - }, - "range": Array [ - 239, - 245, - ], - "type": "TSStringKeyword", - }, - ], - }, - ], - }, - "typeParameters": undefined, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 5, - "line": 8, - }, - }, - "name": "unionLeadingSingle", - "optional": false, - "range": Array [ - 252, - 270, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 247, - 282, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 8, - }, - "start": Object { - "column": 26, - "line": 8, - }, - }, - "range": Array [ - 273, - 281, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 8, - }, - "start": Object { - "column": 28, - "line": 8, - }, - }, - "range": Array [ - 275, - 281, - ], - "type": "TSNumberKeyword", - }, - ], - }, - "typeParameters": undefined, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "name": "intersectionLeadingSingle", - "optional": false, - "range": Array [ - 288, - 313, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 283, - 325, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 33, - "line": 9, - }, - }, - "range": Array [ - 316, - 324, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 35, - "line": 9, - }, - }, - "range": Array [ - 318, - 324, - ], - "type": "TSNumberKeyword", - }, - ], - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 326, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 9, - ], - "type": "Identifier", - "value": "union", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "Keyword", - "value": "null", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 36, - ], - "type": "Identifier", - "value": "undefined", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 38, - 41, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 42, - 54, - ], - "type": "Identifier", - "value": "intersection", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 56, - 62, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 65, - 71, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 73, - 76, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 77, - 88, - ], - "type": "Identifier", - "value": "precedence1", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 90, - 96, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 99, - 105, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 35, - "line": 3, - }, - }, - "range": Array [ - 108, - 115, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 42, - "line": 3, - }, - }, - "range": Array [ - 115, - 116, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 117, - 120, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 121, - 132, - ], - "type": "Identifier", - "value": "precedence2", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 134, - 140, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 141, - 142, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 143, - 149, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 4, - }, - "start": Object { - "column": 33, - "line": 4, - }, - }, - "range": Array [ - 150, - 151, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 4, - }, - }, - "range": Array [ - 152, - 159, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 4, - }, - "start": Object { - "column": 42, - "line": 4, - }, - }, - "range": Array [ - 159, - 160, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 162, - 166, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "range": Array [ - 167, - 179, - ], - "type": "Identifier", - "value": "unionLeading", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 6, - }, - "start": Object { - "column": 18, - "line": 6, - }, - }, - "range": Array [ - 180, - 181, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 20, - "line": 6, - }, - }, - "range": Array [ - 182, - 183, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 6, - }, - "start": Object { - "column": 22, - "line": 6, - }, - }, - "range": Array [ - 184, - 190, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 6, - }, - "start": Object { - "column": 29, - "line": 6, - }, - }, - "range": Array [ - 191, - 192, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 6, - }, - "start": Object { - "column": 31, - "line": 6, - }, - }, - "range": Array [ - 193, - 199, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 6, - }, - "start": Object { - "column": 37, - "line": 6, - }, - }, - "range": Array [ - 199, - 200, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 201, - 205, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, - }, - }, - "range": Array [ - 206, - 225, - ], - "type": "Identifier", - "value": "intersectionLeading", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 7, - }, - "start": Object { - "column": 25, - "line": 7, - }, - }, - "range": Array [ - 226, - 227, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 7, - }, - "start": Object { - "column": 27, - "line": 7, - }, - }, - "range": Array [ - 228, - 229, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 7, - }, - "start": Object { - "column": 29, - "line": 7, - }, - }, - "range": Array [ - 230, - 236, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 7, - }, - "start": Object { - "column": 36, - "line": 7, - }, - }, - "range": Array [ - 237, - 238, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 7, - }, - "start": Object { - "column": 38, - "line": 7, - }, - }, - "range": Array [ - 239, - 245, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 7, - }, - "start": Object { - "column": 44, - "line": 7, - }, - }, - "range": Array [ - 245, - 246, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 247, - 251, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 5, - "line": 8, - }, - }, - "range": Array [ - 252, - 270, - ], - "type": "Identifier", - "value": "unionLeadingSingle", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 8, - }, - "start": Object { - "column": 24, - "line": 8, - }, - }, - "range": Array [ - 271, - 272, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 8, - }, - "start": Object { - "column": 26, - "line": 8, - }, - }, - "range": Array [ - 273, - 274, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 8, - }, - "start": Object { - "column": 28, - "line": 8, - }, - }, - "range": Array [ - 275, - 281, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 8, - }, - "start": Object { - "column": 34, - "line": 8, - }, - }, - "range": Array [ - 281, - 282, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 283, - 287, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "range": Array [ - 288, - 313, - ], - "type": "Identifier", - "value": "intersectionLeadingSingle", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 9, - }, - "start": Object { - "column": 31, - "line": 9, - }, - }, - "range": Array [ - 314, - 315, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 9, - }, - "start": Object { - "column": 33, - "line": 9, - }, - }, - "range": Array [ - 316, - 317, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 35, - "line": 9, - }, - }, - "range": Array [ - 318, - 324, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 9, - }, - "start": Object { - "column": 41, - "line": 9, - }, - }, - "range": Array [ - 324, - 325, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/unique-symbol.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/unique-symbol.src.ts.shot deleted file mode 100644 index e6be35797540..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/unique-symbol.src.ts.shot +++ /dev/null @@ -1,210 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics unique-symbol.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "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", - }, - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Identifier", - "value": "unique", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - "value": "symbol", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/unknown-type-annotation.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/unknown-type-annotation.src.ts.shot deleted file mode 100644 index 2a6acdb61866..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/unknown-type-annotation.src.ts.shot +++ /dev/null @@ -1,211 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics unknown-type-annotation.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 16, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 16, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 16, - ], - "type": "TSUnknownKeyword", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 16, - ], - "type": "Identifier", - "value": "unknown", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/var-with-definite-assignment.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/var-with-definite-assignment.src.ts.shot deleted file mode 100644 index 4f5708663e4b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/var-with-definite-assignment.src.ts.shot +++ /dev/null @@ -1,633 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics var-with-definite-assignment.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 6, - 16, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 16, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "type": "TSStringKeyword", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 22, - 32, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 24, - 32, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 32, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 18, - 33, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 38, - 48, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 40, - 48, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "TSObjectKeyword", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 38, - 48, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 34, - 49, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "Identifier", - "value": "object", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/var-with-dotted-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/var-with-dotted-type.src.ts.shot deleted file mode 100644 index 945791f1e110..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/var-with-dotted-type.src.ts.shot +++ /dev/null @@ -1,381 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics var-with-dotted-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 4, - 14, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "TSTypeReference", - "typeName": Object { - "left": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "TSQualifiedName", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "TSQualifiedName", - }, - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/var-with-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/var-with-type.src.ts.shot deleted file mode 100644 index 22d3088a1ab6..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/var-with-type.src.ts.shot +++ /dev/null @@ -1,503 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics var-with-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 4, - 15, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 15, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "TSStringKeyword", - }, - }, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 28, - ], - "raw": "\\"Nicholas\\"", - "type": "Literal", - "value": "Nicholas", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 28, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 34, - 45, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 37, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "TSStringKeyword", - }, - }, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 48, - 53, - ], - "raw": "\\"Bar\\"", - "type": "Literal", - "value": "Bar", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 34, - 53, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 30, - 54, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 55, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 8, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 28, - ], - "type": "String", - "value": "\\"Nicholas\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 48, - 53, - ], - "type": "String", - "value": "\\"Bar\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/variable-declaration-type-annotation-spacing.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/variable-declaration-type-annotation-spacing.src.ts.shot deleted file mode 100644 index ee4becfbc891..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/variable-declaration-type-annotation-spacing.src.ts.shot +++ /dev/null @@ -1,211 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript basics variable-declaration-type-annotation-spacing.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 21, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 21, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "type": "TSStringKeyword", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 21, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/declare/abstract-class.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/declare/abstract-class.src.ts.shot deleted file mode 100644 index 84d87561a07c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/declare/abstract-class.src.ts.shot +++ /dev/null @@ -1,198 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript declare abstract-class.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": true, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "ClassBody", - }, - "declare": true, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 23, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 16, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 22, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/declare/class.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/declare/class.src.ts.shot deleted file mode 100644 index 78264807b981..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/declare/class.src.ts.shot +++ /dev/null @@ -1,180 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript declare class.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "ClassBody", - }, - "declare": true, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 13, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/declare/enum.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/declare/enum.src.ts.shot deleted file mode 100644 index 2fc02c2308f5..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/declare/enum.src.ts.shot +++ /dev/null @@ -1,293 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript declare enum.src 1`] = ` -Object { - "body": Array [ - Object { - "const": false, - "declare": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "members": Array [ - Object { - "computed": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 23, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "initializer": undefined, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "TSEnumMember", - }, - Object { - "computed": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "Baz", - "optional": false, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "initializer": undefined, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "TSEnumMember", - }, - ], - "range": Array [ - 0, - 37, - ], - "type": "TSEnumDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 12, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - "value": "Baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/declare/function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/declare/function.src.ts.shot deleted file mode 100644 index 1cf91d345f36..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/declare/function.src.ts.shot +++ /dev/null @@ -1,232 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript declare function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": undefined, - "declare": true, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 28, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 28, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSDeclareFunction", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 16, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 28, - ], - "type": "Keyword", - "value": "void", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/declare/interface.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/declare/interface.src.ts.shot deleted file mode 100644 index 8d50d5601dea..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/declare/interface.src.ts.shot +++ /dev/null @@ -1,176 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript declare interface.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 26, - ], - "type": "TSInterfaceBody", - }, - "declare": true, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 17, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/declare/module.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/declare/module.src.ts.shot deleted file mode 100644 index 27c64a552289..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/declare/module.src.ts.shot +++ /dev/null @@ -1,175 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript declare module.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 23, - ], - "type": "TSModuleBlock", - }, - "declare": true, - "global": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/declare/namespace.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/declare/namespace.src.ts.shot deleted file mode 100644 index 849614bd1300..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/declare/namespace.src.ts.shot +++ /dev/null @@ -1,175 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript declare namespace.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 26, - ], - "type": "TSModuleBlock", - }, - "declare": true, - "global": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 17, - ], - "type": "Identifier", - "value": "namespace", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/declare/type-alias.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/declare/type-alias.src.ts.shot deleted file mode 100644 index b8b43753ae0d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/declare/type-alias.src.ts.shot +++ /dev/null @@ -1,174 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript declare type-alias.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "TSStringKeyword", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 12, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Identifier", - "value": "string", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/declare/variable.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/declare/variable.src.ts.shot deleted file mode 100644 index a243c0137416..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/declare/variable.src.ts.shot +++ /dev/null @@ -1,229 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript declare variable.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 12, - 20, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "TSAnyKeyword", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 20, - ], - "type": "VariableDeclarator", - }, - ], - "declare": true, - "kind": "var", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts.shot deleted file mode 100644 index b1e770513ed0..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts.shot +++ /dev/null @@ -1,694 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators accessor-decorators accessor-decorator-factory-instance-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 32, - 37, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "configurable", - "optional": false, - "range": Array [ - 19, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 19, - 38, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 38, - ], - "type": "Decorator", - }, - ], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 18, - 70, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 60, - 64, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "_x", - "optional": false, - "range": Array [ - 65, - 67, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 60, - 67, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 53, - 68, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 51, - 70, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 48, - 70, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 72, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Point", - "optional": false, - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 72, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 72, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - "value": "Point", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 19, - 31, - ], - "type": "Identifier", - "value": "configurable", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 32, - 37, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 43, - 46, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 60, - 64, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 65, - 67, - ], - "type": "Identifier", - "value": "_x", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts.shot deleted file mode 100644 index 7d1123ac28e2..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts.shot +++ /dev/null @@ -1,846 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators accessor-decorators accessor-decorator-factory-static-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 25, - 34, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 30, - 34, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - }, - ], - "range": Array [ - 23, - 36, - ], - "type": "ObjectExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 19, - 37, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 37, - ], - "type": "Decorator", - }, - ], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 53, - 56, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 18, - 80, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 68, - 72, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 35, - "line": 3, - }, - }, - "name": "_bar", - "optional": false, - "range": Array [ - 73, - 77, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 68, - 77, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 61, - 78, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 59, - 80, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 56, - 80, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 82, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Other", - "optional": false, - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 82, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 82, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - "value": "Other", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 30, - 34, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 49, - 52, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 53, - 56, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 61, - 67, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 68, - 72, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 3, - }, - "start": Object { - "column": 34, - "line": 3, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 35, - "line": 3, - }, - }, - "range": Array [ - 73, - 77, - ], - "type": "Identifier", - "value": "_bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 3, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 3, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts.shot deleted file mode 100644 index 15c4040b2461..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts.shot +++ /dev/null @@ -1,600 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators accessor-decorators accessor-decorator-instance-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "hidden", - "optional": false, - "range": Array [ - 15, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Decorator", - }, - ], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 53, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 43, - 47, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "_z", - "optional": false, - "range": Array [ - 48, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 43, - 50, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 36, - 51, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 34, - 53, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 31, - 53, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 55, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "P", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 55, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 55, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "P", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 21, - ], - "type": "Identifier", - "value": "hidden", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 43, - 47, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 48, - 50, - ], - "type": "Identifier", - "value": "_z", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts.shot deleted file mode 100644 index e1290fd6d763..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts.shot +++ /dev/null @@ -1,716 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators accessor-decorators accessor-decorator-static-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "adminonly", - "optional": false, - "range": Array [ - 18, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 27, - ], - "type": "Decorator", - }, - ], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 43, - 44, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 17, - 76, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 58, - 62, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "name": "_y", - "optional": false, - "range": Array [ - 63, - 65, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 58, - 65, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "operator": "=", - "range": Array [ - 58, - 69, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 58, - 70, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 48, - 76, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 44, - 76, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 78, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "User", - "optional": false, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 78, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 78, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - "value": "User", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 18, - 27, - ], - "type": "Identifier", - "value": "adminonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 58, - 62, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 63, - 65, - ], - "type": "Identifier", - "value": "_y", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-decorator-factory.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-decorator-factory.src.ts.shot deleted file mode 100644 index 132245e67986..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-decorator-factory.src.ts.shot +++ /dev/null @@ -1,483 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators class-decorators class-decorator-factory.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 56, - 58, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "selector", - "optional": false, - "range": Array [ - 17, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 17, - 32, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 27, - 32, - ], - "raw": "'foo'", - "type": "Literal", - "value": "foo", - }, - }, - ], - "range": Array [ - 11, - 35, - ], - "type": "ObjectExpression", - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "Component", - "optional": false, - "range": Array [ - 1, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 1, - 36, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "type": "Decorator", - }, - ], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "name": "FooComponent", - "optional": false, - "range": Array [ - 43, - 55, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 58, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 58, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 10, - ], - "type": "Identifier", - "value": "Component", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "Identifier", - "value": "selector", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 27, - 32, - ], - "type": "String", - "value": "'foo'", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 37, - 42, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 43, - 55, - ], - "type": "Identifier", - "value": "FooComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 4, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-decorator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-decorator.src.ts.shot deleted file mode 100644 index c5ad448350fb..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-decorator.src.ts.shot +++ /dev/null @@ -1,237 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators class-decorators class-decorator.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "sealed", - "optional": false, - "range": Array [ - 1, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Decorator", - }, - ], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "Qux", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 7, - ], - "type": "Identifier", - "value": "sealed", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 13, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "Qux", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-parameter-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-parameter-property.src.ts.shot deleted file mode 100644 index e0f6249be853..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/class-parameter-property.src.ts.shot +++ /dev/null @@ -1,567 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators class-decorators class-parameter-property.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 12, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 12, - 48, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 46, - 48, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [ - Object { - "accessibility": "private", - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "name": "d", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Decorator", - }, - ], - "export": false, - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 35, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 36, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "range": Array [ - 24, - 44, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 23, - 48, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 50, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 23, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 34, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 37, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/export-default-class-decorator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/export-default-class-decorator.src.ts.shot deleted file mode 100644 index ef6941711c5b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/export-default-class-decorator.src.ts.shot +++ /dev/null @@ -1,291 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators class-decorators export-default-class-decorator.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 33, - 35, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "sealed", - "optional": false, - "range": Array [ - 1, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Decorator", - }, - ], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "name": "Qux", - "optional": false, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 23, - 35, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 35, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 7, - ], - "type": "Identifier", - "value": "sealed", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 15, - 22, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 23, - 28, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "Qux", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/export-named-class-decorator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/export-named-class-decorator.src.ts.shot deleted file mode 100644 index dba1ae6fd055..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/class-decorators/export-named-class-decorator.src.ts.shot +++ /dev/null @@ -1,276 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators class-decorators export-named-class-decorator.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 25, - 27, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "sealed", - "optional": false, - "range": Array [ - 1, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Decorator", - }, - ], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "Qux", - "optional": false, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 15, - 27, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 27, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 7, - ], - "type": "Identifier", - "value": "sealed", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - "value": "Qux", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts.shot deleted file mode 100644 index fc286d2c5ae9..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts.shot +++ /dev/null @@ -1,511 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators method-decorators method-decorator-factory-instance-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 29, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "onlyRead", - "optional": false, - "range": Array [ - 15, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 15, - 30, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 30, - ], - "type": "Decorator", - }, - ], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "instanceMethod", - "optional": false, - "range": Array [ - 35, - 49, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 54, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 52, - 54, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 49, - 54, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 56, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 56, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 57, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 23, - ], - "type": "Identifier", - "value": "onlyRead", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 29, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 35, - 49, - ], - "type": "Identifier", - "value": "instanceMethod", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts.shot deleted file mode 100644 index 41f927c33474..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts.shot +++ /dev/null @@ -1,529 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators method-decorators method-decorator-factory-static-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 24, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 15, - 25, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Decorator", - }, - ], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "name": "staticMethod", - "optional": false, - "range": Array [ - 37, - 49, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 54, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 52, - 54, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 49, - 54, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 56, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 56, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 57, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 37, - 49, - ], - "type": "Identifier", - "value": "staticMethod", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts.shot deleted file mode 100644 index c8f3fa4ebadf..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts.shot +++ /dev/null @@ -1,417 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators method-decorators method-decorator-instance-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "onlyRead", - "optional": false, - "range": Array [ - 15, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 23, - ], - "type": "Decorator", - }, - ], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "instanceMethod", - "optional": false, - "range": Array [ - 28, - 42, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 47, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 45, - 47, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 42, - 47, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 49, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 23, - ], - "type": "Identifier", - "value": "onlyRead", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 28, - 42, - ], - "type": "Identifier", - "value": "instanceMethod", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-static-member.src.ts.shot deleted file mode 100644 index 98c64e562c2d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-static-member.src.ts.shot +++ /dev/null @@ -1,435 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators method-decorators method-decorator-static-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Decorator", - }, - ], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "name": "staticMethod", - "optional": false, - "range": Array [ - 30, - 42, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 47, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 45, - 47, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 42, - 47, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 49, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "D", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "D", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 30, - 42, - ], - "type": "Identifier", - "value": "staticMethod", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-array-pattern-decorator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-array-pattern-decorator.src.ts.shot deleted file mode 100644 index 13e6abc7abc5..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-array-pattern-decorator.src.ts.shot +++ /dev/null @@ -1,678 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators parameter-decorators parameter-array-pattern-decorator.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 49, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 47, - 49, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 31, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "name": "special", - "optional": false, - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 19, - 32, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 32, - ], - "type": "Decorator", - }, - ], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 35, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 33, - 45, - ], - "type": "ArrayPattern", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 40, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 17, - 49, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 51, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - "value": "special", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 35, - 38, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts.shot deleted file mode 100644 index fd55d3eb030c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts.shot +++ /dev/null @@ -1,943 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators parameter-decorators parameter-decorator-constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 20, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 20, - 113, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 81, - 85, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": "title", - "optional": false, - "range": Array [ - 86, - 91, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 81, - 91, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "operator": "=", - "range": Array [ - 81, - 106, - ], - "right": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "name": "config", - "optional": false, - "range": Array [ - 94, - 100, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "name": "title", - "optional": false, - "range": Array [ - 101, - 106, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 94, - 106, - ], - "type": "MemberExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 81, - 107, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 55, - "line": 2, - }, - }, - "range": Array [ - 71, - 113, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "APP_CONFIG", - "optional": false, - "range": Array [ - 40, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "Inject", - "optional": false, - "range": Array [ - 33, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 33, - 51, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 51, - ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "name": "config", - "optional": false, - "range": Array [ - 52, - 69, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 58, - 69, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "range": Array [ - 60, - 69, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "name": "AppConfig", - "optional": false, - "range": Array [ - 60, - 69, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 31, - 113, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 115, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Service", - "optional": false, - "range": Array [ - 6, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 115, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 116, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 13, - ], - "type": "Identifier", - "value": "Service", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 31, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 33, - 39, - ], - "type": "Identifier", - "value": "Inject", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 50, - ], - "type": "Identifier", - "value": "APP_CONFIG", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 52, - 58, - ], - "type": "Identifier", - "value": "config", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "range": Array [ - 60, - 69, - ], - "type": "Identifier", - "value": "AppConfig", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 2, - }, - "start": Object { - "column": 53, - "line": 2, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 2, - }, - "start": Object { - "column": 55, - "line": 2, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 81, - 85, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 86, - 91, - ], - "type": "Identifier", - "value": "title", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 94, - 100, - ], - "type": "Identifier", - "value": "config", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "range": Array [ - 100, - 101, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 101, - 106, - ], - "type": "Identifier", - "value": "title", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts.shot deleted file mode 100644 index d796ccc509a0..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts.shot +++ /dev/null @@ -1,620 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators parameter-decorators parameter-decorator-decorator-instance-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 16, - 50, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 48, - 50, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 29, - 33, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "special", - "optional": false, - "range": Array [ - 21, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 21, - 34, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 34, - ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 35, - 46, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 19, - 50, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 52, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 53, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 21, - 28, - ], - "type": "Identifier", - "value": "special", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 29, - 33, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 35, - 38, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 37, - "line": 2, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts.shot deleted file mode 100644 index 9ae0c0b122e4..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts.shot +++ /dev/null @@ -1,638 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators parameter-decorators parameter-decorator-decorator-static-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 22, - 63, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 43, - "line": 2, - }, - }, - "range": Array [ - 61, - 63, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 42, - 46, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "special", - "optional": false, - "range": Array [ - 34, - 41, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 34, - 47, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 33, - 47, - ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 48, - 59, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 51, - 59, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 32, - 63, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 65, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "StaticFoo", - "optional": false, - "range": Array [ - 6, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 65, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 66, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 15, - ], - "type": "Identifier", - "value": "StaticFoo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "Identifier", - "value": "special", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 42, - 46, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 48, - 51, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 2, - }, - "start": Object { - "column": 43, - "line": 2, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts.shot deleted file mode 100644 index 95d832d6628f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts.shot +++ /dev/null @@ -1,765 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators parameter-decorators parameter-decorator-instance-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "greet", - "optional": false, - "range": Array [ - 20, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 20, - 95, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 67, - 75, - ], - "raw": "\\"Hello \\"", - "type": "Literal", - "value": "Hello ", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "operator": "+", - "range": Array [ - 67, - 82, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 78, - 82, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "operator": "+", - "range": Array [ - 67, - 88, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 85, - 88, - ], - "raw": "\\"!\\"", - "type": "Literal", - "value": "!", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 60, - 89, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 50, - 95, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "required", - "optional": false, - "range": Array [ - 27, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 35, - ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 36, - 48, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 48, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 25, - 95, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 97, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Greeter", - "optional": false, - "range": Array [ - 6, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 97, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 98, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 13, - ], - "type": "Identifier", - "value": "Greeter", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 25, - ], - "type": "Identifier", - "value": "greet", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 35, - ], - "type": "Identifier", - "value": "required", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 36, - 40, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 60, - 66, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 67, - 75, - ], - "type": "String", - "value": "\\"Hello \\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 78, - 82, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 85, - 88, - ], - "type": "String", - "value": "\\"!\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts.shot deleted file mode 100644 index 435a57981b45..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts.shot +++ /dev/null @@ -1,783 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators parameter-decorators parameter-decorator-static-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "greet", - "optional": false, - "range": Array [ - 33, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 26, - 108, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 80, - 88, - ], - "raw": "\\"Hello \\"", - "type": "Literal", - "value": "Hello ", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "operator": "+", - "range": Array [ - 80, - 95, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 91, - 95, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "operator": "+", - "range": Array [ - 80, - 101, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 98, - 101, - ], - "raw": "\\"!\\"", - "type": "Literal", - "value": "!", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 73, - 102, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 63, - 108, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "required", - "optional": false, - "range": Array [ - 40, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 39, - 48, - ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 49, - 61, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 53, - 61, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 38, - 108, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 110, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "StaticGreeter", - "optional": false, - "range": Array [ - 6, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 110, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 111, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 19, - ], - "type": "Identifier", - "value": "StaticGreeter", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 33, - 38, - ], - "type": "Identifier", - "value": "greet", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 40, - 48, - ], - "type": "Identifier", - "value": "required", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 49, - 53, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 39, - "line": 2, - }, - }, - "range": Array [ - 61, - 62, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 73, - 79, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 80, - 88, - ], - "type": "String", - "value": "\\"Hello \\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 91, - 95, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 98, - 101, - ], - "type": "String", - "value": "\\"!\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 101, - 102, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-object-pattern-decorator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-object-pattern-decorator.src.ts.shot deleted file mode 100644 index 2e7496ff9835..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-object-pattern-decorator.src.ts.shot +++ /dev/null @@ -1,721 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators parameter-decorators parameter-object-pattern-decorator.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 49, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 47, - 49, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 31, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "name": "special", - "optional": false, - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 19, - 32, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 32, - ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 35, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 35, - 38, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 35, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 33, - 45, - ], - "type": "ObjectPattern", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 40, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 17, - 49, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 51, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - "value": "special", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 35, - 38, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-rest-element-decorator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-rest-element-decorator.src.ts.shot deleted file mode 100644 index 02508642ae31..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-rest-element-decorator.src.ts.shot +++ /dev/null @@ -1,659 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators parameter-decorators parameter-rest-element-decorator.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 48, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 48, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "params": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 36, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 31, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "name": "special", - "optional": false, - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 19, - 32, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 32, - ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 18, - 44, - ], - "type": "RestElement", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 39, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 41, - 44, - ], - "type": "TSAnyKeyword", - }, - }, - "value": undefined, - }, - ], - "range": Array [ - 17, - 48, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 50, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - "value": "special", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 33, - 36, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 39, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 41, - 44, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot deleted file mode 100644 index b6ba2ac472cf..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot +++ /dev/null @@ -1,724 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators property-decorators property-decorator-factory-instance-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Input", - "optional": false, - "range": Array [ - 27, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 27, - 34, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 26, - 34, - ], - "type": "Decorator", - }, - ], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "data", - "optional": false, - "range": Array [ - 35, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 26, - 40, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "Output", - "optional": false, - "range": Array [ - 46, - 52, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "optional": false, - "range": Array [ - 46, - 54, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 45, - 54, - ], - "type": "Decorator", - }, - ], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "click", - "optional": false, - "range": Array [ - 59, - 64, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 45, - 86, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "name": "EventEmitter", - "optional": false, - "range": Array [ - 71, - 83, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 67, - 85, - ], - "type": "NewExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 88, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "SomeComponent", - "optional": false, - "range": Array [ - 6, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 88, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 88, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 19, - ], - "type": "Identifier", - "value": "SomeComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 27, - 32, - ], - "type": "Identifier", - "value": "Input", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 35, - 39, - ], - "type": "Identifier", - "value": "data", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "Identifier", - "value": "Output", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 59, - 64, - ], - "type": "Identifier", - "value": "click", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 67, - 70, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 71, - 83, - ], - "type": "Identifier", - "value": "EventEmitter", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 4, - }, - "start": Object { - "column": 28, - "line": 4, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 29, - "line": 4, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 30, - "line": 4, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 87, - 88, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot deleted file mode 100644 index cbd4142c3135..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot +++ /dev/null @@ -1,707 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators property-decorators property-decorator-factory-static-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 32, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "configurable", - "optional": false, - "range": Array [ - 15, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 15, - 33, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 33, - ], - "type": "Decorator", - }, - ], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "name": "prop1", - "optional": false, - "range": Array [ - 41, - 46, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 47, - ], - "readonly": false, - "static": true, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 67, - 72, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - ], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "name": "configurable", - "optional": false, - "range": Array [ - 54, - 66, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "optional": false, - "range": Array [ - 54, - 73, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 53, - 73, - ], - "type": "Decorator", - }, - ], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "name": "prop2", - "optional": false, - "range": Array [ - 85, - 90, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 53, - 91, - ], - "readonly": false, - "static": true, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 93, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 93, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 93, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 27, - ], - "type": "Identifier", - "value": "configurable", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 32, - ], - "type": "Boolean", - "value": "true", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 41, - 46, - ], - "type": "Identifier", - "value": "prop1", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 36, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 54, - 66, - ], - "type": "Identifier", - "value": "configurable", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 67, - 72, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 78, - 84, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 85, - 90, - ], - "type": "Identifier", - "value": "prop2", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 92, - 93, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot deleted file mode 100644 index 0ea7c477352e..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot +++ /dev/null @@ -1,483 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators property-decorators property-decorator-instance-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Decorator", - }, - ], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 21, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "Decorator", - }, - ], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 26, - 37, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 39, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot deleted file mode 100644 index 00b6cb8accbe..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot +++ /dev/null @@ -1,519 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript decorators property-decorators property-decorator-static-member.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Decorator", - }, - ], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 28, - ], - "readonly": false, - "static": true, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - Object { - "accessibility": undefined, - "computed": false, - "declare": false, - "decorators": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "qux", - "optional": false, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "Decorator", - }, - ], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 49, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 33, - 51, - ], - "readonly": false, - "static": true, - "type": "PropertyDefinition", - "typeAnnotation": undefined, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 53, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 53, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 54, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "value": "qux", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-empty-extends-implements.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-empty-extends-implements.src.ts.shot deleted file mode 100644 index 1bd372726993..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-empty-extends-implements.src.ts.shot +++ /dev/null @@ -1,256 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery class-empty-extends-implements.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "TSClassImplements", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 17, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 28, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-empty-extends.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-empty-extends.src.ts.shot deleted file mode 100644 index 3e03c06505ae..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-empty-extends.src.ts.shot +++ /dev/null @@ -1,180 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery class-empty-extends.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 17, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-extends-empty-implements.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-extends-empty-implements.src.ts.shot deleted file mode 100644 index bc24a042d3e5..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-extends-empty-implements.src.ts.shot +++ /dev/null @@ -1,236 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery class-extends-empty-implements.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "superClass": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "Bar", - "optional": false, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 17, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 32, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-multiple-implements.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-multiple-implements.src.ts.shot deleted file mode 100644 index a9266f6761f2..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/class-multiple-implements.src.ts.shot +++ /dev/null @@ -1,274 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery class-multiple-implements.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 36, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "TSClassImplements", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 18, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 31, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-enum-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-enum-declaration.src.ts.shot deleted file mode 100644 index bf9719e0e4de..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-enum-declaration.src.ts.shot +++ /dev/null @@ -1,176 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery decorator-on-enum-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "const": false, - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "E", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 0, - 14, - ], - "type": "TSEnumDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "Identifier", - "value": "dec", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 9, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "E", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-function.src.ts.shot deleted file mode 100644 index c8a92c1fa3cc..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-function.src.ts.shot +++ /dev/null @@ -1,234 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery decorator-on-function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 19, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "Identifier", - "value": "dec", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 5, - 13, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-interface-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-interface-declaration.src.ts.shot deleted file mode 100644 index ec47840850a0..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-interface-declaration.src.ts.shot +++ /dev/null @@ -1,230 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery decorator-on-interface-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "M", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 5, - ], - "type": "Identifier", - "value": "deco", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 17, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "M", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-variable.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-variable.src.ts.shot deleted file mode 100644 index a50ff86e3b63..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/decorator-on-variable.src.ts.shot +++ /dev/null @@ -1,250 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery decorator-on-variable.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 5, - ], - "type": "Identifier", - "value": "deco", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 8, - 13, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Numeric", - "value": "1", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments-in-call-expression.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments-in-call-expression.src.ts.shot deleted file mode 100644 index 2c09af5f398a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments-in-call-expression.src.ts.shot +++ /dev/null @@ -1,211 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery empty-type-arguments-in-call-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 7, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 3, - 5, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments-in-new-expression.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments-in-new-expression.src.ts.shot deleted file mode 100644 index 93860b87c8b8..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments-in-new-expression.src.ts.shot +++ /dev/null @@ -1,210 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery empty-type-arguments-in-new-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "NewExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 7, - 9, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ")", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments.src.ts.shot deleted file mode 100644 index 45e46b0c9709..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-arguments.src.ts.shot +++ /dev/null @@ -1,268 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery empty-type-arguments.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 16, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 16, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 14, - 16, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ">", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-arrow-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-arrow-function.src.ts.shot deleted file mode 100644 index 62578efead5d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-arrow-function.src.ts.shot +++ /dev/null @@ -1,251 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery empty-type-parameters-in-arrow-function.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f1", - "optional": false, - "range": Array [ - 9, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 18, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 11, - 13, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Identifier", - "value": "f1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-constructor.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-constructor.src.ts.shot deleted file mode 100644 index a4efe9571481..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-constructor.src.ts.shot +++ /dev/null @@ -1,395 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery empty-type-parameters-in-constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 32, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 30, - 32, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 25, - 32, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 25, - 27, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 34, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-function-expression.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-function-expression.src.ts.shot deleted file mode 100644 index 864e243a7e81..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-function-expression.src.ts.shot +++ /dev/null @@ -1,327 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery empty-type-parameters-in-function-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 27, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 12, - 27, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 20, - 22, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 27, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 20, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method-signature.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method-signature.src.ts.shot deleted file mode 100644 index 4bfcb929485b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method-signature.src.ts.shot +++ /dev/null @@ -1,332 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery empty-type-parameters-in-method-signature.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 18, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [], - "range": Array [ - 18, - 27, - ], - "readonly": false, - "returnType": undefined, - "static": false, - "type": "TSMethodSignature", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 22, - 24, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 29, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method.src.ts.shot deleted file mode 100644 index 9a77a16527e4..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method.src.ts.shot +++ /dev/null @@ -1,395 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery empty-type-parameters-in-method.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "test", - "optional": false, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 14, - 25, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 18, - 25, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 18, - 20, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 27, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters.src.ts.shot deleted file mode 100644 index 4dd8d5a0b2c7..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters.src.ts.shot +++ /dev/null @@ -1,251 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery empty-type-parameters.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f1", - "optional": false, - "range": Array [ - 9, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 18, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 11, - 13, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Identifier", - "value": "f1", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/enum-with-keywords.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/enum-with-keywords.src.ts.shot deleted file mode 100644 index f6ee5e0b2c43..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/enum-with-keywords.src.ts.shot +++ /dev/null @@ -1,305 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery enum-with-keywords.src 1`] = ` -Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "const": false, - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 68, - "line": 1, - }, - }, - "name": "X", - "optional": false, - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 7, - 72, - ], - "type": "TSEnumDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 72, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 72, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 31, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 47, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "range": Array [ - 48, - 56, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 62, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 67, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "range": Array [ - 63, - 67, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 68, - "line": 1, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - "value": "X", - }, - Object { - "loc": Object { - "end": Object { - "column": 71, - "line": 1, - }, - "start": Object { - "column": 70, - "line": 1, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 71, - "line": 1, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/index-signature-parameters.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/index-signature-parameters.src.ts.shot deleted file mode 100644 index b883986f4e25..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/index-signature-parameters.src.ts.shot +++ /dev/null @@ -1,557 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery index-signature-parameters.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "members": Array [ - Object { - "accessibility": undefined, - "export": false, - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "parameters": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 16, - 25, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 27, - 36, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 28, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 15, - 46, - ], - "readonly": false, - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 37, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 11, - 48, - ], - "type": "TSTypeLiteral", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-empty-extends.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-empty-extends.src.ts.shot deleted file mode 100644 index 5c37a401de17..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-empty-extends.src.ts.shot +++ /dev/null @@ -1,176 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-empty-extends.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 26, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-implements.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-implements.src.ts.shot deleted file mode 100644 index 6cab0a70e5f1..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-implements.src.ts.shot +++ /dev/null @@ -1,194 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-implements.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 27, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "d", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 22, - ], - "type": "Keyword", - "value": "implements", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-export.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-export.src.ts.shot deleted file mode 100644 index a516da8fd010..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-export.src.ts.shot +++ /dev/null @@ -1,432 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-index-signature-export.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "export": true, - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "parameters": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 26, - 37, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 18, - 47, - ], - "readonly": false, - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 38, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 49, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-private.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-private.src.ts.shot deleted file mode 100644 index e06857bbd7bf..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-private.src.ts.shot +++ /dev/null @@ -1,432 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-index-signature-private.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": "private", - "export": false, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "parameters": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 27, - 38, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 18, - 48, - ], - "readonly": false, - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 39, - 47, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 47, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 50, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 25, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 47, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-protected.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-protected.src.ts.shot deleted file mode 100644 index 04c38fdea4ad..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-protected.src.ts.shot +++ /dev/null @@ -1,432 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-index-signature-protected.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": "protected", - "export": false, - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "parameters": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 29, - 40, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 40, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 18, - 50, - ], - "readonly": false, - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 49, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 43, - 49, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 52, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 54, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 27, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 43, - 49, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-public.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-public.src.ts.shot deleted file mode 100644 index f03d9d10a9c8..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-public.src.ts.shot +++ /dev/null @@ -1,432 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-index-signature-public.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": "public", - "export": false, - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "parameters": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 26, - 37, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 18, - 47, - ], - "readonly": false, - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 38, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 49, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-static.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-static.src.ts.shot deleted file mode 100644 index 81cf1090cc6a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-index-signature-static.src.ts.shot +++ /dev/null @@ -1,432 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-index-signature-static.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "export": false, - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "parameters": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 26, - 37, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 18, - 47, - ], - "readonly": false, - "static": true, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 38, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 49, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-export.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-export.src.ts.shot deleted file mode 100644 index 629a050332e9..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-export.src.ts.shot +++ /dev/null @@ -1,475 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-method-export.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": true, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "g", - "optional": false, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 29, - 40, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 40, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 20, - 48, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 47, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 43, - 47, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 50, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "g", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 43, - 47, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-private.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-private.src.ts.shot deleted file mode 100644 index b812425f1e22..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-private.src.ts.shot +++ /dev/null @@ -1,475 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-method-private.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": "private", - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "g", - "optional": false, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 30, - 41, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 33, - 41, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 20, - 49, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 44, - 48, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 51, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 53, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 27, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "g", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 44, - 48, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-protected.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-protected.src.ts.shot deleted file mode 100644 index df9ea8a3ca46..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-protected.src.ts.shot +++ /dev/null @@ -1,475 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-method-protected.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": "protected", - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "g", - "optional": false, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 30, - 41, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 33, - 41, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 18, - 49, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 44, - 48, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 51, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 53, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 27, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "g", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 33, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 44, - 48, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-public.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-public.src.ts.shot deleted file mode 100644 index 2a67eb873bb3..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-public.src.ts.shot +++ /dev/null @@ -1,475 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-method-public.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": "public", - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "g", - "optional": false, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 29, - 40, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 40, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 20, - 48, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 47, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 43, - 47, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 50, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 52, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "g", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 43, - 47, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-readonly.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-readonly.src.ts.shot deleted file mode 100644 index ecb26e58be2b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-readonly.src.ts.shot +++ /dev/null @@ -1,475 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-method-readonly.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "g", - "optional": false, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 29, - 40, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 40, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 18, - 48, - ], - "readonly": true, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 47, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 43, - 47, - ], - "type": "TSVoidKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 50, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 26, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "g", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 43, - 47, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-static.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-static.src.ts.shot deleted file mode 100644 index 34440f371198..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-static.src.ts.shot +++ /dev/null @@ -1,475 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-method-static.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "g", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 27, - 38, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 18, - 46, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 45, - ], - "type": "TSVoidKeyword", - }, - }, - "static": true, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 48, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "g", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 41, - 45, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-multiple-extends.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-multiple-extends.src.ts.shot deleted file mode 100644 index 282c743b38e0..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-multiple-extends.src.ts.shot +++ /dev/null @@ -1,309 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-multiple-extends.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 40, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [ - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "TSInterfaceHeritage", - "typeParameters": undefined, - }, - Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "name": "baz", - "optional": false, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "TSInterfaceHeritage", - "typeParameters": undefined, - }, - ], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 33, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-export.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-export.src.ts.shot deleted file mode 100644 index 257598e46888..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-export.src.ts.shot +++ /dev/null @@ -1,328 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-property-export.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": true, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 18, - 35, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 34, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 37, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-private.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-private.src.ts.shot deleted file mode 100644 index 2650e9af820f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-private.src.ts.shot +++ /dev/null @@ -1,328 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-property-private.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": "private", - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 18, - 36, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 35, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 38, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 25, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-protected.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-protected.src.ts.shot deleted file mode 100644 index 6538b7b36597..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-protected.src.ts.shot +++ /dev/null @@ -1,328 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-property-protected.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": "protected", - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 18, - 38, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 40, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 27, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-public.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-public.src.ts.shot deleted file mode 100644 index 29b3d54a1ca4..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-public.src.ts.shot +++ /dev/null @@ -1,328 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-property-public.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": "public", - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 20, - 37, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 39, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-static.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-static.src.ts.shot deleted file mode 100644 index b51bb812a728..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-static.src.ts.shot +++ /dev/null @@ -1,328 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-property-static.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 18, - 35, - ], - "readonly": false, - "static": true, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 34, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 37, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-with-default-value.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-with-default-value.src.ts.shot deleted file mode 100644 index 64aeed4e3d2c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-property-with-default-value.src.ts.shot +++ /dev/null @@ -1,364 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-property-with-default-value.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 35, - ], - "raw": "'a'", - "type": "Literal", - "value": "a", - }, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 18, - 36, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 21, - 29, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 38, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "String", - "value": "'a'", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-with-optional-index-signature.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-with-optional-index-signature.src.ts.shot deleted file mode 100644 index e36e4a5be9bf..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-with-optional-index-signature.src.ts.shot +++ /dev/null @@ -1,432 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery interface-with-optional-index-signature.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "export": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "parameters": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "fff", - "optional": true, - "range": Array [ - 19, - 31, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 23, - 31, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 18, - 41, - ], - "readonly": false, - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 40, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 43, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "fff", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/object-assertion-not-allowed.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/object-assertion-not-allowed.src.ts.shot deleted file mode 100644 index 54343656d5c3..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/object-assertion-not-allowed.src.ts.shot +++ /dev/null @@ -1,329 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery object-assertion-not-allowed.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 4, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 5, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 1, - 10, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 8, - 10, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ")", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/object-optional-not-allowed.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/object-optional-not-allowed.src.ts.shot deleted file mode 100644 index eb90daf1aa4d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/object-optional-not-allowed.src.ts.shot +++ /dev/null @@ -1,329 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery object-optional-not-allowed.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 2, - 4, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 1, - 5, - ], - "type": "ObjectPattern", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 1, - 10, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 8, - 10, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ")", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/solo-const.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/solo-const.src.ts.shot deleted file mode 100644 index 1b638349b828..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/solo-const.src.ts.shot +++ /dev/null @@ -1,65 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript errorRecovery solo-const.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/expressions/call-expression-type-arguments.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/expressions/call-expression-type-arguments.src.ts.shot deleted file mode 100644 index 7c214e71e32e..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/expressions/call-expression-type-arguments.src.ts.shot +++ /dev/null @@ -1,489 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript expressions call-expression-type-arguments.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 8, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 3, - 6, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 10, - 23, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 13, - 21, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 10, - 24, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/expressions/instantiation-expression.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/expressions/instantiation-expression.src.ts.shot deleted file mode 100644 index 75ed4901410a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/expressions/instantiation-expression.src.ts.shot +++ /dev/null @@ -1,2391 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript expressions instantiation-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 4, - ], - "type": "TSInstantiationExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 1, - 4, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 8, - 12, - ], - "type": "TSInstantiationExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 9, - 12, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 7, - 16, - ], - "type": "TSInstantiationExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 13, - 16, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 7, - 17, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 19, - 23, - ], - "type": "TSInstantiationExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 20, - 23, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "optional": false, - "range": Array [ - 18, - 29, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 24, - 27, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 18, - 30, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "expression": Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 32, - 36, - ], - "type": "TSInstantiationExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 33, - 36, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 31, - 40, - ], - "type": "TSInstantiationExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 37, - 40, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "optional": true, - "range": Array [ - 31, - 44, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 31, - 44, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 31, - 45, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "expression": Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 47, - 51, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "range": Array [ - 47, - 51, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "range": Array [ - 47, - 54, - ], - "type": "TSInstantiationExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 51, - 54, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "optional": false, - "range": Array [ - 46, - 60, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "name": "d", - "optional": false, - "range": Array [ - 56, - 57, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 55, - 58, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 46, - 61, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "arguments": Array [], - "callee": Object { - "expression": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 67, - 68, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, - }, - }, - "range": Array [ - 67, - 71, - ], - "type": "TSInstantiationExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 69, - 70, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 68, - 71, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 62, - 77, - ], - "type": "NewExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 73, - 74, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 72, - 75, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 62, - 78, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 79, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 3, - "line": 4, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 40, - 42, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 48, - 50, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 6, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 6, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Identifier", - "value": "d", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 62, - 65, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 7, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 7, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/expressions/new-expression-type-arguments.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/expressions/new-expression-type-arguments.src.ts.shot deleted file mode 100644 index 0c5811985c56..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/expressions/new-expression-type-arguments.src.ts.shot +++ /dev/null @@ -1,382 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript expressions new-expression-type-arguments.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 20, - ], - "type": "NewExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 15, - 18, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 20, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "const", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/expressions/optional-call-expression-type-arguments.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/expressions/optional-call-expression-type-arguments.src.ts.shot deleted file mode 100644 index f7794772ecf4..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/expressions/optional-call-expression-type-arguments.src.ts.shot +++ /dev/null @@ -1,675 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript expressions optional-call-expression-type-arguments.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 0, - 8, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 0, - 13, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 8, - 11, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", - }, - Object { - "directive": undefined, - "expression": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "object": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "optional": true, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 15, - 23, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "optional": false, - "range": Array [ - 15, - 33, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 23, - 31, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 15, - 33, - ], - "type": "ChainExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 15, - 34, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 5, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "Punctuator", - "value": "?.", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/expressions/tagged-template-expression-type-arguments.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/expressions/tagged-template-expression-type-arguments.src.ts.shot deleted file mode 100644 index 79df088d98f1..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/expressions/tagged-template-expression-type-arguments.src.ts.shot +++ /dev/null @@ -1,291 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript expressions tagged-template-expression-type-arguments.src 1`] = ` -Object { - "body": Array [ - Object { - "directive": undefined, - "expression": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "quasi": Object { - "expressions": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 13, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "baz", - "raw": "baz", - }, - }, - ], - "range": Array [ - 8, - 13, - ], - "type": "TemplateLiteral", - }, - "range": Array [ - 0, - 13, - ], - "tag": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "TaggedTemplateExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 3, - 8, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 13, - ], - "type": "Template", - "value": "\`baz\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts.shot deleted file mode 100644 index 4990086e9431..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts.shot +++ /dev/null @@ -1,342 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript namespaces-and-modules ambient-module-declaration-with-import.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "assertions": Array [], - "importKind": "value", - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 34, - 54, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 49, - 53, - ], - "raw": "'fs'", - "type": "Literal", - "value": "fs", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "local": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "fs", - "optional": false, - "range": Array [ - 41, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 41, - 43, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 56, - ], - "type": "TSModuleBlock", - }, - "declare": true, - "global": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 29, - ], - "raw": "\\"i-use-things\\"", - "type": "Literal", - "value": "i-use-things", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 56, - ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 57, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 29, - ], - "type": "String", - "value": "\\"i-use-things\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 34, - 40, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 41, - 43, - ], - "type": "Identifier", - "value": "fs", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 44, - 48, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 49, - 53, - ], - "type": "String", - "value": "'fs'", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts.shot deleted file mode 100644 index 5f47122f26e5..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts.shot +++ /dev/null @@ -1,640 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript namespaces-and-modules declare-namespace-with-exported-function.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "async": false, - "body": undefined, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "select", - "optional": false, - "range": Array [ - 41, - 47, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "selector", - "optional": false, - "range": Array [ - 48, - 64, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 56, - 64, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 32, - 82, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 65, - 81, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "range": Array [ - 67, - 81, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "name": "Selection", - "optional": false, - "range": Array [ - 67, - 76, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 2, - }, - "start": Object { - "column": 53, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 54, - "line": 2, - }, - }, - "range": Array [ - 77, - 80, - ], - "type": "TSAnyKeyword", - }, - ], - "range": Array [ - 76, - 81, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - "type": "TSDeclareFunction", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 25, - 82, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 84, - ], - "type": "TSModuleBlock", - }, - "declare": true, - "global": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "d3", - "optional": false, - "range": Array [ - 18, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 84, - ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 84, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 17, - ], - "type": "Identifier", - "value": "namespace", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "Identifier", - "value": "d3", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 32, - 40, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 41, - 47, - ], - "type": "Identifier", - "value": "select", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 48, - 56, - ], - "type": "Identifier", - "value": "selector", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "range": Array [ - 67, - 76, - ], - "type": "Identifier", - "value": "Selection", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 2, - }, - "start": Object { - "column": 53, - "line": 2, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 54, - "line": 2, - }, - }, - "range": Array [ - 77, - 80, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 2, - }, - "start": Object { - "column": 57, - "line": 2, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 58, - "line": 2, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/global-module-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/global-module-declaration.src.ts.shot deleted file mode 100644 index 7dfc6f3a45fa..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/global-module-declaration.src.ts.shot +++ /dev/null @@ -1,454 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript namespaces-and-modules global-module-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 43, - 51, - ], - "type": "TSModuleBlock", - }, - "declare": true, - "global": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "name": "global", - "optional": false, - "range": Array [ - 36, - 42, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 51, - ], - "type": "TSModuleDeclaration", - }, - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 29, - "line": 5, - }, - }, - "range": Array [ - 81, - 89, - ], - "type": "TSModuleBlock", - }, - "declare": true, - "global": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "name": "global", - "optional": false, - "range": Array [ - 74, - 80, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 56, - 89, - ], - "type": "TSModuleDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 91, - ], - "type": "TSModuleBlock", - }, - "declare": true, - "global": true, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "global", - "optional": false, - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 91, - ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 92, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - "value": "global", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 28, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "Identifier", - "value": "global", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 56, - 63, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 64, - 73, - ], - "type": "Identifier", - "value": "namespace", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 5, - }, - "start": Object { - "column": 22, - "line": 5, - }, - }, - "range": Array [ - 74, - 80, - ], - "type": "Identifier", - "value": "global", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 5, - }, - "start": Object { - "column": 29, - "line": 5, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/module-with-default-exports.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/module-with-default-exports.src.ts.shot deleted file mode 100644 index b7e172473d12..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/module-with-default-exports.src.ts.shot +++ /dev/null @@ -1,859 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript namespaces-and-modules module-with-default-exports.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "method", - "optional": false, - "range": Array [ - 52, - 58, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 52, - 66, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 64, - 66, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 58, - 66, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 60, - 63, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 62, - 63, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 42, - 73, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "C", - "optional": false, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 34, - 73, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 73, - ], - "type": "ExportDefaultDeclaration", - }, - Object { - "declaration": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 34, - "line": 5, - }, - }, - "range": Array [ - 108, - 110, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 5, - }, - "start": Object { - "column": 28, - "line": 5, - }, - }, - "name": "bar", - "optional": false, - "range": Array [ - 102, - 105, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "params": Array [], - "range": Array [ - 93, - 110, - ], - "returnType": undefined, - "type": "FunctionDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 78, - 110, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 112, - ], - "type": "TSModuleBlock", - }, - "declare": false, - "global": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 112, - ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 114, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 26, - 33, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 34, - 39, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 52, - 58, - ], - "type": "Identifier", - "value": "method", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Identifier", - "value": "C", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 78, - 84, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 85, - 92, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 93, - 101, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 5, - }, - "start": Object { - "column": 28, - "line": 5, - }, - }, - "range": Array [ - 102, - 105, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 5, - }, - "start": Object { - "column": 31, - "line": 5, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 5, - }, - "start": Object { - "column": 32, - "line": 5, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 5, - }, - "start": Object { - "column": 34, - "line": 5, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 35, - "line": 5, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 111, - 112, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot deleted file mode 100644 index 722a1fb0276e..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot +++ /dev/null @@ -1,1511 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript namespaces-and-modules nested-internal-module.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 31, - 44, - ], - "raw": "'hello world'", - "type": "Literal", - "value": "hello world", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 27, - 44, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 23, - 44, - ], - "type": "VariableDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 16, - 44, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - Object { - "assertions": Array [], - "declaration": Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "name": "constructor", - "optional": false, - "range": Array [ - 78, - 89, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 78, - 129, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 56, - "line": 5, - }, - }, - "range": Array [ - 126, - 129, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "params": Array [ - Object { - "accessibility": "public", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 27, - "line": 5, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 97, - 106, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 28, - "line": 5, - }, - }, - "range": Array [ - 98, - 106, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "range": Array [ - 100, - 106, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "range": Array [ - 90, - 106, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "public", - "decorators": Array [], - "export": false, - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 38, - "line": 5, - }, - }, - "override": false, - "parameter": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 45, - "line": 5, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 115, - 124, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 46, - "line": 5, - }, - }, - "range": Array [ - 116, - 124, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 48, - "line": 5, - }, - }, - "range": Array [ - 118, - 124, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "range": Array [ - 108, - 124, - ], - "readonly": false, - "static": false, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 89, - 129, - ], - "returnType": undefined, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 68, - 135, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "name": "Point", - "optional": false, - "range": Array [ - 62, - 67, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 56, - 135, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 49, - 135, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - Object { - "assertions": Array [], - "declaration": Object { - "body": Object { - "body": Array [ - Object { - "assertions": Array [], - "declaration": Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "name": "name", - "optional": false, - "range": Array [ - 200, - 204, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "optional": false, - "range": Array [ - 200, - 213, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 9, - }, - "start": Object { - "column": 16, - "line": 9, - }, - }, - "range": Array [ - 204, - 212, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 9, - }, - "start": Object { - "column": 18, - "line": 9, - }, - }, - "range": Array [ - 206, - 212, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 28, - "line": 8, - }, - }, - "range": Array [ - 186, - 223, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 8, - }, - "start": Object { - "column": 25, - "line": 8, - }, - }, - "name": "Id", - "optional": false, - "range": Array [ - 183, - 185, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "range": Array [ - 173, - 223, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - "exportKind": "type", - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 166, - 223, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "range": Array [ - 156, - 229, - ], - "type": "TSModuleBlock", - }, - "declare": false, - "global": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 18, - "line": 7, - }, - }, - "name": "B", - "optional": false, - "range": Array [ - 154, - 155, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 147, - 229, - ], - "type": "TSModuleDeclaration", - }, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 140, - 229, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 231, - ], - "type": "TSModuleBlock", - }, - "declare": false, - "global": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 231, - ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 231, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 3, - }, - }, - "range": Array [ - 31, - 44, - ], - "type": "String", - "value": "'hello world'", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 49, - 55, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 56, - 61, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 62, - 67, - ], - "type": "Identifier", - "value": "Point", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 78, - 89, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "range": Array [ - 90, - 96, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 5, - }, - "start": Object { - "column": 27, - "line": 5, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 5, - }, - "start": Object { - "column": 28, - "line": 5, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "range": Array [ - 100, - 106, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 5, - }, - "start": Object { - "column": 36, - "line": 5, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 5, - }, - "start": Object { - "column": 38, - "line": 5, - }, - }, - "range": Array [ - 108, - 114, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 45, - "line": 5, - }, - }, - "range": Array [ - 115, - 116, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 5, - }, - "start": Object { - "column": 46, - "line": 5, - }, - }, - "range": Array [ - 116, - 117, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 48, - "line": 5, - }, - }, - "range": Array [ - 118, - 124, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 54, - "line": 5, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 56, - "line": 5, - }, - }, - "range": Array [ - 126, - 127, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 58, - "line": 5, - }, - }, - "range": Array [ - 128, - 129, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 134, - 135, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 140, - 146, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 147, - 153, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 18, - "line": 7, - }, - }, - "range": Array [ - 154, - 155, - ], - "type": "Identifier", - "value": "B", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "range": Array [ - 156, - 157, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 166, - 172, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "range": Array [ - 173, - 182, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 8, - }, - "start": Object { - "column": 25, - "line": 8, - }, - }, - "range": Array [ - 183, - 185, - ], - "type": "Identifier", - "value": "Id", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 8, - }, - "start": Object { - "column": 28, - "line": 8, - }, - }, - "range": Array [ - 186, - 187, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "range": Array [ - 200, - 204, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 9, - }, - "start": Object { - "column": 16, - "line": 9, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 9, - }, - "start": Object { - "column": 18, - "line": 9, - }, - }, - "range": Array [ - 206, - 212, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 9, - }, - "start": Object { - "column": 24, - "line": 9, - }, - }, - "range": Array [ - 212, - 213, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 8, - "line": 10, - }, - }, - "range": Array [ - 222, - 223, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "range": Array [ - 228, - 229, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 12, - }, - }, - "range": Array [ - 230, - 231, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts.shot deleted file mode 100644 index 948f990fb52c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts.shot +++ /dev/null @@ -1,137 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript namespaces-and-modules shorthand-ambient-module-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": true, - "global": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 31, - ], - "raw": "\\"hot-new-module\\"", - "type": "Literal", - "value": "hot-new-module", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "type": "TSModuleDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Identifier", - "value": "declare", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 31, - ], - "type": "String", - "value": "\\"hot-new-module\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/array-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/array-type.src.ts.shot deleted file mode 100644 index 661e8e4736cc..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/array-type.src.ts.shot +++ /dev/null @@ -1,209 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types array-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSStringKeyword", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 19, - ], - "type": "TSArrayType", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "]", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-nested.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-nested.src.ts.shot deleted file mode 100644 index 911eba052486..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-nested.src.ts.shot +++ /dev/null @@ -1,1350 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types conditional-infer-nested.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Unpacked", - "optional": false, - "range": Array [ - 5, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 126, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "extendsType": Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 32, - 39, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 38, - 39, - ], - "type": "TSTypeParameter", - }, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 31, - 42, - ], - "type": "TSArrayType", - }, - "falseType": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "extendsType": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 63, - 70, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 69, - 70, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 69, - 70, - ], - "type": "TSTypeParameter", - }, - }, - "falseType": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 83, - 84, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "extendsType": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 93, - 109, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "name": "Promise", - "optional": false, - "range": Array [ - 93, - 100, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 101, - 108, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 30, - "line": 4, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 30, - "line": 4, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 107, - 108, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 107, - 108, - ], - "type": "TSTypeParameter", - }, - }, - ], - "range": Array [ - 100, - 109, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "falseType": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 124, - 125, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 83, - 125, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 4, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 4, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 112, - 113, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "type": "TSConditionalType", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 53, - 125, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 73, - 74, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "type": "TSConditionalType", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 21, - 125, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "type": "TSConditionalType", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 14, - 15, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 13, - 16, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 127, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 13, - ], - "type": "Identifier", - "value": "Unpacked", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 30, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 32, - 37, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 55, - 62, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 63, - 68, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 3, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 85, - 92, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 93, - 100, - ], - "type": "Identifier", - "value": "Promise", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 100, - 101, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 101, - 106, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 30, - "line": 4, - }, - }, - "range": Array [ - 107, - 108, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 31, - "line": 4, - }, - }, - "range": Array [ - 108, - 109, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 4, - }, - "start": Object { - "column": 33, - "line": 4, - }, - }, - "range": Array [ - 110, - 111, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 4, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 37, - "line": 4, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 124, - 125, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-simple.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-simple.src.ts.shot deleted file mode 100644 index 895938f15daf..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-simple.src.ts.shot +++ /dev/null @@ -1,932 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types conditional-infer-simple.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 63, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 63, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "extendsType": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "members": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 26, - 37, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 36, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 35, - 36, - ], - "type": "TSTypeParameter", - }, - }, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 38, - 48, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 48, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 48, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 47, - 48, - ], - "type": "TSTypeParameter", - }, - }, - }, - }, - ], - "range": Array [ - 24, - 50, - ], - "type": "TSTypeLiteral", - }, - "falseType": Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 62, - ], - "type": "TSNeverKeyword", - }, - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 62, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "type": "TSConditionalType", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 9, - 10, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 8, - 11, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 64, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 46, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 55, - "line": 1, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 62, - ], - "type": "Identifier", - "value": "never", - }, - Object { - "loc": Object { - "end": Object { - "column": 63, - "line": 1, - }, - "start": Object { - "column": 62, - "line": 1, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-with-constraint.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-with-constraint.src.ts.shot deleted file mode 100644 index 522c462a14b7..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-with-constraint.src.ts.shot +++ /dev/null @@ -1,4267 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types conditional-infer-with-constraint.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "X3", - "optional": false, - "range": Array [ - 5, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 74, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 74, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "extendsType": Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 46, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "TSNumberKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 30, - 46, - ], - "type": "TSTypeParameter", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 47, - ], - "type": "TSTupleType", - }, - "falseType": Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 1, - }, - "start": Object { - "column": 68, - "line": 1, - }, - }, - "range": Array [ - 68, - 73, - ], - "type": "TSNeverKeyword", - }, - "loc": Object { - "end": Object { - "column": 73, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 73, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "range": Array [ - 50, - 65, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "name": "MustBeNumber", - "optional": false, - "range": Array [ - 50, - 62, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 1, - }, - "start": Object { - "column": 62, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 63, - 64, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 62, - 65, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "type": "TSConditionalType", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 8, - 9, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 7, - 10, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "X4", - "optional": false, - "range": Array [ - 80, - 82, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 98, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 75, - 173, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 88, - 89, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "extendsType": Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 99, - 121, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "range": Array [ - 115, - 121, - ], - "type": "TSNumberKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 105, - 106, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 105, - 121, - ], - "type": "TSTypeParameter", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 70, - "line": 2, - }, - "start": Object { - "column": 48, - "line": 2, - }, - }, - "range": Array [ - 123, - 145, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 70, - "line": 2, - }, - "start": Object { - "column": 64, - "line": 2, - }, - }, - "range": Array [ - 139, - 145, - ], - "type": "TSNumberKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 70, - "line": 2, - }, - "start": Object { - "column": 54, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 55, - "line": 2, - }, - "start": Object { - "column": 54, - "line": 2, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 129, - 130, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 129, - 145, - ], - "type": "TSTypeParameter", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 71, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 98, - 146, - ], - "type": "TSTupleType", - }, - "falseType": Object { - "loc": Object { - "end": Object { - "column": 97, - "line": 2, - }, - "start": Object { - "column": 92, - "line": 2, - }, - }, - "range": Array [ - 167, - 172, - ], - "type": "TSNeverKeyword", - }, - "loc": Object { - "end": Object { - "column": 97, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 88, - 172, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 89, - "line": 2, - }, - "start": Object { - "column": 74, - "line": 2, - }, - }, - "range": Array [ - 149, - 164, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 86, - "line": 2, - }, - "start": Object { - "column": 74, - "line": 2, - }, - }, - "name": "MustBeNumber", - "optional": false, - "range": Array [ - 149, - 161, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 89, - "line": 2, - }, - "start": Object { - "column": 86, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 88, - "line": 2, - }, - "start": Object { - "column": 87, - "line": 2, - }, - }, - "range": Array [ - 162, - 163, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 88, - "line": 2, - }, - "start": Object { - "column": 87, - "line": 2, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 162, - 163, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 161, - 164, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "type": "TSConditionalType", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 83, - 84, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 83, - 84, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 82, - 85, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "X5", - "optional": false, - "range": Array [ - 179, - 181, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 83, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 174, - 257, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 187, - 188, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 187, - 188, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "extendsType": Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 198, - 220, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 40, - "line": 3, - }, - }, - "range": Array [ - 214, - 220, - ], - "type": "TSNumberKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 204, - 205, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 204, - 220, - ], - "type": "TSTypeParameter", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 3, - }, - "start": Object { - "column": 48, - "line": 3, - }, - }, - "range": Array [ - 222, - 229, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 55, - "line": 3, - }, - "start": Object { - "column": 54, - "line": 3, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 55, - "line": 3, - }, - "start": Object { - "column": 54, - "line": 3, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 228, - 229, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 228, - 229, - ], - "type": "TSTypeParameter", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 56, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 197, - 230, - ], - "type": "TSTupleType", - }, - "falseType": Object { - "loc": Object { - "end": Object { - "column": 82, - "line": 3, - }, - "start": Object { - "column": 77, - "line": 3, - }, - }, - "range": Array [ - 251, - 256, - ], - "type": "TSNeverKeyword", - }, - "loc": Object { - "end": Object { - "column": 82, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 187, - 256, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 3, - }, - "start": Object { - "column": 59, - "line": 3, - }, - }, - "range": Array [ - 233, - 248, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 71, - "line": 3, - }, - "start": Object { - "column": 59, - "line": 3, - }, - }, - "name": "MustBeNumber", - "optional": false, - "range": Array [ - 233, - 245, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 3, - }, - "start": Object { - "column": 71, - "line": 3, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 3, - }, - "start": Object { - "column": 72, - "line": 3, - }, - }, - "range": Array [ - 246, - 247, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 73, - "line": 3, - }, - "start": Object { - "column": 72, - "line": 3, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 246, - 247, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 245, - 248, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "type": "TSConditionalType", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 182, - 183, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 182, - 183, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 181, - 184, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "name": "X6", - "optional": false, - "range": Array [ - 263, - 265, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 83, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 258, - 341, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 271, - 272, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 271, - 272, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "extendsType": Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 282, - 289, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 30, - "line": 4, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 30, - "line": 4, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 288, - 289, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 288, - 289, - ], - "type": "TSTypeParameter", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 4, - }, - "start": Object { - "column": 33, - "line": 4, - }, - }, - "range": Array [ - 291, - 313, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 4, - }, - "start": Object { - "column": 49, - "line": 4, - }, - }, - "range": Array [ - 307, - 313, - ], - "type": "TSNumberKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 55, - "line": 4, - }, - "start": Object { - "column": 39, - "line": 4, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 39, - "line": 4, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 297, - 298, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 297, - 313, - ], - "type": "TSTypeParameter", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 56, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 281, - 314, - ], - "type": "TSTupleType", - }, - "falseType": Object { - "loc": Object { - "end": Object { - "column": 82, - "line": 4, - }, - "start": Object { - "column": 77, - "line": 4, - }, - }, - "range": Array [ - 335, - 340, - ], - "type": "TSNeverKeyword", - }, - "loc": Object { - "end": Object { - "column": 82, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 271, - 340, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 4, - }, - "start": Object { - "column": 59, - "line": 4, - }, - }, - "range": Array [ - 317, - 332, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 71, - "line": 4, - }, - "start": Object { - "column": 59, - "line": 4, - }, - }, - "name": "MustBeNumber", - "optional": false, - "range": Array [ - 317, - 329, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 4, - }, - "start": Object { - "column": 71, - "line": 4, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 4, - }, - "start": Object { - "column": 72, - "line": 4, - }, - }, - "range": Array [ - 330, - 331, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 73, - "line": 4, - }, - "start": Object { - "column": 72, - "line": 4, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 330, - 331, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 329, - 332, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "type": "TSConditionalType", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 266, - 267, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 266, - 267, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 265, - 268, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "name": "X7", - "optional": false, - "range": Array [ - 347, - 349, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 84, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 342, - 426, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 355, - 356, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 355, - 356, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "extendsType": Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 24, - "line": 5, - }, - }, - "range": Array [ - 366, - 388, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 382, - 388, - ], - "type": "TSStringKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 372, - 373, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 372, - 388, - ], - "type": "TSTypeParameter", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 70, - "line": 5, - }, - "start": Object { - "column": 48, - "line": 5, - }, - }, - "range": Array [ - 390, - 412, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 70, - "line": 5, - }, - "start": Object { - "column": 64, - "line": 5, - }, - }, - "range": Array [ - 406, - 412, - ], - "type": "TSNumberKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 70, - "line": 5, - }, - "start": Object { - "column": 54, - "line": 5, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 54, - "line": 5, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 396, - 397, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 396, - 412, - ], - "type": "TSTypeParameter", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 71, - "line": 5, - }, - "start": Object { - "column": 23, - "line": 5, - }, - }, - "range": Array [ - 365, - 413, - ], - "type": "TSTupleType", - }, - "falseType": Object { - "loc": Object { - "end": Object { - "column": 83, - "line": 5, - }, - "start": Object { - "column": 78, - "line": 5, - }, - }, - "range": Array [ - 420, - 425, - ], - "type": "TSNeverKeyword", - }, - "loc": Object { - "end": Object { - "column": 83, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 355, - 425, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 75, - "line": 5, - }, - "start": Object { - "column": 74, - "line": 5, - }, - }, - "range": Array [ - 416, - 417, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 75, - "line": 5, - }, - "start": Object { - "column": 74, - "line": 5, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 416, - 417, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "type": "TSConditionalType", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 350, - 351, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 350, - 351, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 349, - 352, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 427, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 7, - ], - "type": "Identifier", - "value": "X3", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 22, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 29, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 39, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "range": Array [ - 50, - 62, - ], - "type": "Identifier", - "value": "MustBeNumber", - }, - Object { - "loc": Object { - "end": Object { - "column": 63, - "line": 1, - }, - "start": Object { - "column": 62, - "line": 1, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 1, - }, - "start": Object { - "column": 64, - "line": 1, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 67, - "line": 1, - }, - "start": Object { - "column": 66, - "line": 1, - }, - }, - "range": Array [ - 66, - 67, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 1, - }, - "start": Object { - "column": 68, - "line": 1, - }, - }, - "range": Array [ - 68, - 73, - ], - "type": "Identifier", - "value": "never", - }, - Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 1, - }, - "start": Object { - "column": 73, - "line": 1, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 75, - 79, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 80, - 82, - ], - "type": "Identifier", - "value": "X4", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 90, - 97, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 98, - 99, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 99, - 104, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 105, - 106, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 107, - 114, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "range": Array [ - 115, - 121, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 2, - }, - "start": Object { - "column": 46, - "line": 2, - }, - }, - "range": Array [ - 121, - 122, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 48, - "line": 2, - }, - }, - "range": Array [ - 123, - 128, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 2, - }, - "start": Object { - "column": 54, - "line": 2, - }, - }, - "range": Array [ - 129, - 130, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 63, - "line": 2, - }, - "start": Object { - "column": 56, - "line": 2, - }, - }, - "range": Array [ - 131, - 138, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 70, - "line": 2, - }, - "start": Object { - "column": 64, - "line": 2, - }, - }, - "range": Array [ - 139, - 145, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 71, - "line": 2, - }, - "start": Object { - "column": 70, - "line": 2, - }, - }, - "range": Array [ - 145, - 146, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 2, - }, - "start": Object { - "column": 72, - "line": 2, - }, - }, - "range": Array [ - 147, - 148, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 86, - "line": 2, - }, - "start": Object { - "column": 74, - "line": 2, - }, - }, - "range": Array [ - 149, - 161, - ], - "type": "Identifier", - "value": "MustBeNumber", - }, - Object { - "loc": Object { - "end": Object { - "column": 87, - "line": 2, - }, - "start": Object { - "column": 86, - "line": 2, - }, - }, - "range": Array [ - 161, - 162, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 88, - "line": 2, - }, - "start": Object { - "column": 87, - "line": 2, - }, - }, - "range": Array [ - 162, - 163, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 89, - "line": 2, - }, - "start": Object { - "column": 88, - "line": 2, - }, - }, - "range": Array [ - 163, - 164, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 91, - "line": 2, - }, - "start": Object { - "column": 90, - "line": 2, - }, - }, - "range": Array [ - 165, - 166, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 97, - "line": 2, - }, - "start": Object { - "column": 92, - "line": 2, - }, - }, - "range": Array [ - 167, - 172, - ], - "type": "Identifier", - "value": "never", - }, - Object { - "loc": Object { - "end": Object { - "column": 98, - "line": 2, - }, - "start": Object { - "column": 97, - "line": 2, - }, - }, - "range": Array [ - 172, - 173, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 174, - 178, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 179, - 181, - ], - "type": "Identifier", - "value": "X5", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 181, - 182, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 182, - 183, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 183, - 184, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 185, - 186, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 187, - 188, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 189, - 196, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 197, - 198, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 198, - 203, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 32, - "line": 3, - }, - }, - "range": Array [ - 206, - 213, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 40, - "line": 3, - }, - }, - "range": Array [ - 214, - 220, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 46, - "line": 3, - }, - }, - "range": Array [ - 220, - 221, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 3, - }, - "start": Object { - "column": 48, - "line": 3, - }, - }, - "range": Array [ - 222, - 227, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 3, - }, - "start": Object { - "column": 54, - "line": 3, - }, - }, - "range": Array [ - 228, - 229, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 3, - }, - "start": Object { - "column": 55, - "line": 3, - }, - }, - "range": Array [ - 229, - 230, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 3, - }, - "start": Object { - "column": 57, - "line": 3, - }, - }, - "range": Array [ - 231, - 232, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 71, - "line": 3, - }, - "start": Object { - "column": 59, - "line": 3, - }, - }, - "range": Array [ - 233, - 245, - ], - "type": "Identifier", - "value": "MustBeNumber", - }, - Object { - "loc": Object { - "end": Object { - "column": 72, - "line": 3, - }, - "start": Object { - "column": 71, - "line": 3, - }, - }, - "range": Array [ - 245, - 246, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 3, - }, - "start": Object { - "column": 72, - "line": 3, - }, - }, - "range": Array [ - 246, - 247, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 3, - }, - "start": Object { - "column": 73, - "line": 3, - }, - }, - "range": Array [ - 247, - 248, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 76, - "line": 3, - }, - "start": Object { - "column": 75, - "line": 3, - }, - }, - "range": Array [ - 249, - 250, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 82, - "line": 3, - }, - "start": Object { - "column": 77, - "line": 3, - }, - }, - "range": Array [ - 251, - 256, - ], - "type": "Identifier", - "value": "never", - }, - Object { - "loc": Object { - "end": Object { - "column": 83, - "line": 3, - }, - "start": Object { - "column": 82, - "line": 3, - }, - }, - "range": Array [ - 256, - 257, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 258, - 262, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 263, - 265, - ], - "type": "Identifier", - "value": "X6", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 4, - }, - }, - "range": Array [ - 265, - 266, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 266, - 267, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 267, - 268, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 269, - 270, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 271, - 272, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 273, - 280, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 281, - 282, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 282, - 287, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 30, - "line": 4, - }, - }, - "range": Array [ - 288, - 289, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 31, - "line": 4, - }, - }, - "range": Array [ - 289, - 290, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 33, - "line": 4, - }, - }, - "range": Array [ - 291, - 296, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 39, - "line": 4, - }, - }, - "range": Array [ - 297, - 298, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 4, - }, - "start": Object { - "column": 41, - "line": 4, - }, - }, - "range": Array [ - 299, - 306, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 4, - }, - "start": Object { - "column": 49, - "line": 4, - }, - }, - "range": Array [ - 307, - 313, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 4, - }, - "start": Object { - "column": 55, - "line": 4, - }, - }, - "range": Array [ - 313, - 314, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 4, - }, - "start": Object { - "column": 57, - "line": 4, - }, - }, - "range": Array [ - 315, - 316, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 71, - "line": 4, - }, - "start": Object { - "column": 59, - "line": 4, - }, - }, - "range": Array [ - 317, - 329, - ], - "type": "Identifier", - "value": "MustBeNumber", - }, - Object { - "loc": Object { - "end": Object { - "column": 72, - "line": 4, - }, - "start": Object { - "column": 71, - "line": 4, - }, - }, - "range": Array [ - 329, - 330, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 4, - }, - "start": Object { - "column": 72, - "line": 4, - }, - }, - "range": Array [ - 330, - 331, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 4, - }, - "start": Object { - "column": 73, - "line": 4, - }, - }, - "range": Array [ - 331, - 332, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 76, - "line": 4, - }, - "start": Object { - "column": 75, - "line": 4, - }, - }, - "range": Array [ - 333, - 334, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 82, - "line": 4, - }, - "start": Object { - "column": 77, - "line": 4, - }, - }, - "range": Array [ - 335, - 340, - ], - "type": "Identifier", - "value": "never", - }, - Object { - "loc": Object { - "end": Object { - "column": 83, - "line": 4, - }, - "start": Object { - "column": 82, - "line": 4, - }, - }, - "range": Array [ - 340, - 341, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 342, - 346, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "range": Array [ - 347, - 349, - ], - "type": "Identifier", - "value": "X7", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 7, - "line": 5, - }, - }, - "range": Array [ - 349, - 350, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 350, - 351, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "range": Array [ - 351, - 352, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 353, - 354, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 5, - }, - }, - "range": Array [ - 355, - 356, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 357, - 364, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 23, - "line": 5, - }, - }, - "range": Array [ - 365, - 366, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 5, - }, - "start": Object { - "column": 24, - "line": 5, - }, - }, - "range": Array [ - 366, - 371, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "range": Array [ - 372, - 373, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 5, - }, - "start": Object { - "column": 32, - "line": 5, - }, - }, - "range": Array [ - 374, - 381, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 382, - 388, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 5, - }, - "start": Object { - "column": 46, - "line": 5, - }, - }, - "range": Array [ - 388, - 389, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 5, - }, - "start": Object { - "column": 48, - "line": 5, - }, - }, - "range": Array [ - 390, - 395, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 54, - "line": 5, - }, - }, - "range": Array [ - 396, - 397, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 63, - "line": 5, - }, - "start": Object { - "column": 56, - "line": 5, - }, - }, - "range": Array [ - 398, - 405, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 70, - "line": 5, - }, - "start": Object { - "column": 64, - "line": 5, - }, - }, - "range": Array [ - 406, - 412, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 71, - "line": 5, - }, - "start": Object { - "column": 70, - "line": 5, - }, - }, - "range": Array [ - 412, - 413, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 5, - }, - "start": Object { - "column": 72, - "line": 5, - }, - }, - "range": Array [ - 414, - 415, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 75, - "line": 5, - }, - "start": Object { - "column": 74, - "line": 5, - }, - }, - "range": Array [ - 416, - 417, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 5, - }, - "start": Object { - "column": 76, - "line": 5, - }, - }, - "range": Array [ - 418, - 419, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 83, - "line": 5, - }, - "start": Object { - "column": 78, - "line": 5, - }, - }, - "range": Array [ - 420, - 425, - ], - "type": "Identifier", - "value": "never", - }, - Object { - "loc": Object { - "end": Object { - "column": 84, - "line": 5, - }, - "start": Object { - "column": 83, - "line": 5, - }, - }, - "range": Array [ - 425, - 426, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer.src.ts.shot deleted file mode 100644 index d556be2bb330..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer.src.ts.shot +++ /dev/null @@ -1,679 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types conditional-infer.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Element", - "optional": false, - "range": Array [ - 5, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "extendsType": Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 36, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 35, - 36, - ], - "type": "TSTypeParameter", - }, - }, - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 39, - ], - "type": "TSArrayType", - }, - "falseType": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 46, - 47, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 47, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "type": "TSConditionalType", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 13, - 14, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 12, - 15, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 12, - ], - "type": "Identifier", - "value": "Element", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 27, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "type": "Identifier", - "value": "infer", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-with-null.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/conditional-with-null.src.ts.shot deleted file mode 100644 index 876c8a65b999..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-with-null.src.ts.shot +++ /dev/null @@ -1,387 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types conditional-with-null.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 45, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "type": "TSNumberKeyword", - }, - "extendsType": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSStringKeyword", - }, - "falseType": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 45, - ], - "type": "TSNullKeyword", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 45, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "TSBooleanKeyword", - }, - "type": "TSConditionalType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 45, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 46, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 45, - ], - "type": "Keyword", - "value": "null", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/conditional.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/conditional.src.ts.shot deleted file mode 100644 index 8f5bdbc813ec..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/conditional.src.ts.shot +++ /dev/null @@ -1,387 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types conditional.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 47, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 47, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "checkType": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "type": "TSNumberKeyword", - }, - "extendsType": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSStringKeyword", - }, - "falseType": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 47, - ], - "type": "TSStringKeyword", - }, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 47, - ], - "trueType": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "TSBooleanKeyword", - }, - "type": "TSConditionalType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 47, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 47, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/constructor-abstract.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/constructor-abstract.src.ts.shot deleted file mode 100644 index 6f8cbb5fcba3..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/constructor-abstract.src.ts.shot +++ /dev/null @@ -1,338 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types constructor-abstract.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 30, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 30, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "abstract": true, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 7, - 30, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 30, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSConstructorType", - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 30, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "Identifier", - "value": "abstract", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/constructor-empty.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/constructor-empty.src.ts.shot deleted file mode 100644 index b6b6fbdd8fd6..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/constructor-empty.src.ts.shot +++ /dev/null @@ -1,320 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types constructor-empty.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 21, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 21, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "abstract": false, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 7, - 21, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSConstructorType", - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 21, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/constructor-generic.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/constructor-generic.src.ts.shot deleted file mode 100644 index 6315190137cd..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/constructor-generic.src.ts.shot +++ /dev/null @@ -1,587 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types constructor-generic.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 4, - 25, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 25, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "abstract": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 7, - 25, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "type": "TSConstructorType", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 12, - 13, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 11, - 14, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/constructor-in-generic.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/constructor-in-generic.src.ts.shot deleted file mode 100644 index 3ef5ac52bce4..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/constructor-in-generic.src.ts.shot +++ /dev/null @@ -1,431 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types constructor-in-generic.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 30, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 30, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 30, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "Array", - "optional": false, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "params": Array [ - Object { - "abstract": false, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 13, - 29, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 29, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "TSStringKeyword", - }, - }, - "type": "TSConstructorType", - "typeParameters": undefined, - }, - ], - "range": Array [ - 12, - 30, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 30, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "value": "Array", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/constructor-with-rest.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/constructor-with-rest.src.ts.shot deleted file mode 100644 index 9302a680a286..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/constructor-with-rest.src.ts.shot +++ /dev/null @@ -1,521 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types constructor-with-rest.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 4, - 35, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 35, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "abstract": false, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 12, - 26, - ], - "type": "RestElement", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 26, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "TSNumberKeyword", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 26, - ], - "type": "TSArrayType", - }, - }, - "value": undefined, - }, - ], - "range": Array [ - 7, - 35, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 35, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 35, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSConstructorType", - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 35, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 24, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 35, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/constructor.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/constructor.src.ts.shot deleted file mode 100644 index baa59e3376a3..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/constructor.src.ts.shot +++ /dev/null @@ -1,573 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types constructor.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 4, - 42, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 42, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "abstract": false, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 12, - 21, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 21, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "type": "TSNumberKeyword", - }, - }, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "b", - "optional": true, - "range": Array [ - 23, - 33, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 33, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 7, - 42, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 42, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 42, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSConstructorType", - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 42, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 43, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 37, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 42, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/function-generic.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/function-generic.src.ts.shot deleted file mode 100644 index f02012c203f8..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/function-generic.src.ts.shot +++ /dev/null @@ -1,568 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types function-generic.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 4, - 21, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 21, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 11, - 15, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 15, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 7, - 21, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "type": "TSFunctionType", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 8, - 9, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 7, - 10, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 21, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/function-in-generic.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/function-in-generic.src.ts.shot deleted file mode 100644 index 842b56c99504..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/function-in-generic.src.ts.shot +++ /dev/null @@ -1,412 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types function-in-generic.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 24, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 24, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 24, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "Array", - "optional": false, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 13, - 23, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 23, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - ], - "range": Array [ - 12, - 24, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 24, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "value": "Array", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 23, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/function-with-array-destruction.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/function-with-array-destruction.src.ts.shot deleted file mode 100644 index f643c7622c5f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/function-with-array-destruction.src.ts.shot +++ /dev/null @@ -1,413 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types function-with-array-destruction.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "elements": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 12, - 20, - ], - "type": "ArrayPattern", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 11, - 28, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "TSAnyKeyword", - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "any", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/function-with-object-destruction.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/function-with-object-destruction.src.ts.shot deleted file mode 100644 index e15775eab01b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/function-with-object-destruction.src.ts.shot +++ /dev/null @@ -1,456 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types function-with-object-destruction.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "optional": false, - "range": Array [ - 13, - 14, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - }, - ], - "range": Array [ - 12, - 20, - ], - "type": "ObjectPattern", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "TSAnyKeyword", - }, - }, - }, - ], - "range": Array [ - 11, - 28, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "TSAnyKeyword", - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "any", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/function-with-rest.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/function-with-rest.src.ts.shot deleted file mode 100644 index b7b0cf57c2f3..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/function-with-rest.src.ts.shot +++ /dev/null @@ -1,502 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types function-with-rest.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 4, - 31, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 31, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "argument": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 8, - 22, - ], - "type": "RestElement", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 22, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "TSNumberKeyword", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 22, - ], - "type": "TSArrayType", - }, - }, - "value": undefined, - }, - ], - "range": Array [ - 7, - 31, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 31, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 31, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/function-with-this.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/function-with-this.src.ts.shot deleted file mode 100644 index 9d7b67352dbb..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/function-with-this.src.ts.shot +++ /dev/null @@ -1,410 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types function-with-this.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 4, - 29, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 29, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "this", - "optional": false, - "range": Array [ - 8, - 20, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 20, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 7, - 29, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 29, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 29, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 29, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 12, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 29, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/function.src.ts.shot deleted file mode 100644 index fbb141e32dcb..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/function.src.ts.shot +++ /dev/null @@ -1,554 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types function.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "f", - "optional": false, - "range": Array [ - 4, - 38, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 8, - 17, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 17, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSNumberKeyword", - }, - }, - }, - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "b", - "optional": true, - "range": Array [ - 19, - 29, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 29, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 7, - 38, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 38, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 38, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 33, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 38, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/index-signature-readonly.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/index-signature-readonly.src.ts.shot deleted file mode 100644 index ce7d3c96f62f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/index-signature-readonly.src.ts.shot +++ /dev/null @@ -1,449 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types index-signature-readonly.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "members": Array [ - Object { - "accessibility": undefined, - "export": false, - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "parameters": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "key", - "optional": false, - "range": Array [ - 25, - 36, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 28, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 15, - 46, - ], - "readonly": true, - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 37, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 11, - 48, - ], - "type": "TSTypeLiteral", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 15, - 23, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - "value": "key", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/index-signature-without-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/index-signature-without-type.src.ts.shot deleted file mode 100644 index 2cc1ba964e97..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/index-signature-without-type.src.ts.shot +++ /dev/null @@ -1,362 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types index-signature-without-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "members": Array [ - Object { - "accessibility": undefined, - "export": false, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "parameters": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 16, - 25, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 15, - 27, - ], - "readonly": false, - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": undefined, - }, - ], - "range": Array [ - 11, - 29, - ], - "type": "TSTypeLiteral", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/index-signature.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/index-signature.src.ts.shot deleted file mode 100644 index 59bc2f213682..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/index-signature.src.ts.shot +++ /dev/null @@ -1,431 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types index-signature.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "members": Array [ - Object { - "accessibility": undefined, - "export": false, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "parameters": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 16, - 25, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 15, - 35, - ], - "readonly": false, - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 26, - 34, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 11, - 37, - ], - "type": "TSTypeLiteral", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/indexed.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/indexed.src.ts.shot deleted file mode 100644 index 703c2baac085..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/indexed.src.ts.shot +++ /dev/null @@ -1,343 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types indexed.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 11, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "indexType": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "K", - "optional": false, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "objectType": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "range": Array [ - 7, - 11, - ], - "type": "TSIndexedAccessType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 11, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "K", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/interface-with-accessors.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/interface-with-accessors.src.ts.shot deleted file mode 100644 index 0b85e594dadd..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/interface-with-accessors.src.ts.shot +++ /dev/null @@ -1,738 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types interface-with-accessors.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "size", - "optional": false, - "range": Array [ - 24, - 28, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [], - "range": Array [ - 20, - 39, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 30, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "TSNumberKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "size", - "optional": false, - "range": Array [ - 46, - 50, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "name": "value", - "optional": false, - "range": Array [ - 51, - 83, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 56, - 83, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 58, - 83, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "range": Array [ - 67, - 73, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 76, - 83, - ], - "type": "TSBooleanKeyword", - }, - ], - }, - }, - }, - ], - "range": Array [ - 42, - 85, - ], - "readonly": false, - "returnType": undefined, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 87, - ], - "type": "TSInterfaceBody", - }, - "declare": false, - "extends": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Thing", - "optional": false, - "range": Array [ - 10, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 87, - ], - "type": "TSInterfaceDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 88, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 15, - ], - "type": "Identifier", - "value": "Thing", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 24, - 28, - ], - "type": "Identifier", - "value": "size", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 46, - 50, - ], - "type": "Identifier", - "value": "size", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 51, - 56, - ], - "type": "Identifier", - "value": "value", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "range": Array [ - 65, - 66, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "range": Array [ - 67, - 73, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 3, - }, - "start": Object { - "column": 34, - "line": 3, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 76, - 83, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 3, - }, - "start": Object { - "column": 43, - "line": 3, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 44, - "line": 3, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/intersection-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/intersection-type.src.ts.shot deleted file mode 100644 index 904a7453e7fe..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/intersection-type.src.ts.shot +++ /dev/null @@ -1,668 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types intersection-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "LinkedList", - "optional": false, - "range": Array [ - 5, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 49, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 48, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "members": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": "next", - "optional": false, - "range": Array [ - 27, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 27, - 46, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 46, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "name": "LinkedList", - "optional": false, - "range": Array [ - 33, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 44, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 43, - 46, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - ], - "range": Array [ - 25, - 48, - ], - "type": "TSTypeLiteral", - }, - ], - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 16, - 17, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 15, - 18, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 15, - ], - "type": "Identifier", - "value": "LinkedList", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "Identifier", - "value": "next", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 43, - ], - "type": "Identifier", - "value": "LinkedList", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/literal-number-negative.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/literal-number-negative.src.ts.shot deleted file mode 100644 index 3480afeff7ed..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/literal-number-negative.src.ts.shot +++ /dev/null @@ -1,267 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types literal-number-negative.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 9, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 9, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "literal": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "operator": "-", - "prefix": true, - "range": Array [ - 7, - 9, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "TSLiteralType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 9, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "-", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/literal-number.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/literal-number.src.ts.shot deleted file mode 100644 index 204be090cbdf..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/literal-number.src.ts.shot +++ /dev/null @@ -1,230 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types literal-number.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 8, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "TSLiteralType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 8, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/literal-string.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/literal-string.src.ts.shot deleted file mode 100644 index 863e84993a81..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/literal-string.src.ts.shot +++ /dev/null @@ -1,230 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types literal-string.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 12, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 12, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "TSLiteralType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 12, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/mapped-named-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/mapped-named-type.src.ts.shot deleted file mode 100644 index 4d666f1164bc..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/mapped-named-type.src.ts.shot +++ /dev/null @@ -1,789 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types mapped-named-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Test", - "optional": false, - "range": Array [ - 5, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "nameType": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 36, - 39, - ], - "raw": "'a'", - "type": "Literal", - "value": "a", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 36, - 39, - ], - "type": "TSLiteralType", - }, - "optional": undefined, - "range": Array [ - 15, - 49, - ], - "readonly": undefined, - "type": "TSMappedType", - "typeAnnotation": Object { - "indexType": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "name": "P", - "optional": false, - "range": Array [ - 44, - 45, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "objectType": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - "range": Array [ - 42, - 46, - ], - "type": "TSIndexedAccessType", - }, - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "operator": "keyof", - "range": Array [ - 25, - 32, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "name": "P", - "optional": false, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 20, - 32, - ], - "type": "TSTypeParameter", - }, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 10, - 11, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 9, - 12, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 51, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 9, - ], - "type": "Identifier", - "value": "Test", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "P", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 25, - 30, - ], - "type": "Identifier", - "value": "keyof", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 33, - 35, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 36, - 39, - ], - "type": "String", - "value": "'a'", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Identifier", - "value": "P", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 48, - 49, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly-minus.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly-minus.src.ts.shot deleted file mode 100644 index 5c8253cce0f2..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly-minus.src.ts.shot +++ /dev/null @@ -1,505 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types mapped-readonly-minus.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "map", - "optional": false, - "range": Array [ - 4, - 46, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "nameType": null, - "optional": "-", - "range": Array [ - 9, - 46, - ], - "readonly": "-", - "type": "TSMappedType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "TSNumberKeyword", - }, - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "TSStringKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "P", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 22, - 33, - ], - "type": "TSTypeParameter", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 46, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "map", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "-", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 20, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "P", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "-", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly-plus.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly-plus.src.ts.shot deleted file mode 100644 index e0a3f82a0f65..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly-plus.src.ts.shot +++ /dev/null @@ -1,523 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types mapped-readonly-plus.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "map", - "optional": false, - "range": Array [ - 4, - 47, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 47, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "nameType": null, - "optional": "+", - "range": Array [ - 9, - 47, - ], - "readonly": "+", - "type": "TSMappedType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "TSNumberKeyword", - }, - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "TSStringKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "P", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 22, - 33, - ], - "type": "TSTypeParameter", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 47, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "map", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 20, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "P", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "+", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly.src.ts.shot deleted file mode 100644 index e40f0c706208..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/mapped-readonly.src.ts.shot +++ /dev/null @@ -1,487 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types mapped-readonly.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "map", - "optional": false, - "range": Array [ - 4, - 45, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "nameType": null, - "optional": true, - "range": Array [ - 9, - 45, - ], - "readonly": true, - "type": "TSMappedType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "TSNumberKeyword", - }, - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "TSStringKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "P", - "optional": false, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 21, - 32, - ], - "type": "TSTypeParameter", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 45, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 46, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "map", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 19, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "P", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/mapped-untypped.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/mapped-untypped.src.ts.shot deleted file mode 100644 index b1d3f6463b69..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/mapped-untypped.src.ts.shot +++ /dev/null @@ -1,399 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types mapped-untypped.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "map", - "optional": false, - "range": Array [ - 4, - 27, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 27, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "nameType": null, - "optional": undefined, - "range": Array [ - 9, - 27, - ], - "readonly": undefined, - "type": "TSMappedType", - "typeAnnotation": undefined, - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 23, - ], - "type": "TSStringKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "P", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 12, - 23, - ], - "type": "TSTypeParameter", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 27, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "map", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "P", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 23, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/mapped.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/mapped.src.ts.shot deleted file mode 100644 index 8b69a4937921..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/mapped.src.ts.shot +++ /dev/null @@ -1,451 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types mapped.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "map", - "optional": false, - "range": Array [ - 4, - 35, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 35, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "nameType": null, - "optional": undefined, - "range": Array [ - 9, - 35, - ], - "readonly": undefined, - "type": "TSMappedType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "TSNumberKeyword", - }, - "typeParameter": Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 23, - ], - "type": "TSStringKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "P", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 12, - 23, - ], - "type": "TSTypeParameter", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 35, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "map", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "P", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 23, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/nested-types.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/nested-types.src.ts.shot deleted file mode 100644 index bc759904969e..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/nested-types.src.ts.shot +++ /dev/null @@ -1,964 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types nested-types.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 80, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 80, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 27, - ], - "type": "TSOptionalType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "TSStringKeyword", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 37, - ], - "type": "TSOptionalType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 36, - ], - "type": "TSBooleanKeyword", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 38, - ], - "type": "TSTupleType", - }, - Object { - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 80, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 42, - 44, - ], - "type": "TSTypeLiteral", - }, - Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 74, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 54, - ], - "type": "TSOptionalType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 53, - ], - "type": "TSNumberKeyword", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 55, - ], - "type": "TSTupleType", - }, - Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 1, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "range": Array [ - 58, - 74, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "range": Array [ - 58, - 62, - ], - "type": "TSNullKeyword", - }, - Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 65, - "line": 1, - }, - }, - "range": Array [ - 65, - 72, - ], - "type": "TSBooleanKeyword", - }, - "loc": Object { - "end": Object { - "column": 74, - "line": 1, - }, - "start": Object { - "column": 65, - "line": 1, - }, - }, - "range": Array [ - 65, - 74, - ], - "type": "TSArrayType", - }, - ], - }, - ], - }, - ], - "loc": Object { - "end": Object { - "column": 75, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 75, - ], - "type": "TSTupleType", - }, - Object { - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 78, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 78, - 80, - ], - "type": "TSTypeLiteral", - }, - ], - }, - ], - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 81, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 36, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 53, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 53, - "line": 1, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 54, - "line": 1, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 1, - }, - "start": Object { - "column": 56, - "line": 1, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "range": Array [ - 58, - 62, - ], - "type": "Keyword", - "value": "null", - }, - Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 65, - "line": 1, - }, - }, - "range": Array [ - 65, - 72, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 1, - }, - "start": Object { - "column": 72, - "line": 1, - }, - }, - "range": Array [ - 72, - 73, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 1, - }, - "start": Object { - "column": 73, - "line": 1, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 75, - "line": 1, - }, - "start": Object { - "column": 74, - "line": 1, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 76, - "line": 1, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 1, - }, - "start": Object { - "column": 78, - "line": 1, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 79, - "line": 1, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/object-literal-type-with-accessors.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/object-literal-type-with-accessors.src.ts.shot deleted file mode 100644 index d1c75c15bc12..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/object-literal-type-with-accessors.src.ts.shot +++ /dev/null @@ -1,773 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types object-literal-type-with-accessors.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Thing", - "optional": false, - "range": Array [ - 5, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 85, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "members": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "size", - "optional": false, - "range": Array [ - 21, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "params": Array [], - "range": Array [ - 17, - 36, - ], - "readonly": false, - "returnType": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 27, - 35, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "TSNumberKeyword", - }, - }, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "size", - "optional": false, - "range": Array [ - 43, - 47, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": false, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "name": "value", - "optional": false, - "range": Array [ - 48, - 80, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 53, - 80, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 55, - 80, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "range": Array [ - 64, - 70, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 73, - 80, - ], - "type": "TSBooleanKeyword", - }, - ], - }, - }, - }, - ], - "range": Array [ - 39, - 82, - ], - "readonly": false, - "returnType": undefined, - "static": false, - "type": "TSMethodSignature", - "typeParameters": undefined, - }, - ], - "range": Array [ - 13, - 84, - ], - "type": "TSTypeLiteral", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 86, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "Identifier", - "value": "Thing", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "Identifier", - "value": "size", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 43, - 47, - ], - "type": "Identifier", - "value": "size", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 48, - 53, - ], - "type": "Identifier", - "value": "value", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 3, - }, - }, - "range": Array [ - 64, - 70, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 3, - }, - "start": Object { - "column": 34, - "line": 3, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 73, - 80, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 3, - }, - "start": Object { - "column": 43, - "line": 3, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 3, - }, - "start": Object { - "column": 44, - "line": 3, - }, - }, - "range": Array [ - 81, - 82, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 83, - 84, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in-and-out.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in-and-out.src.ts.shot deleted file mode 100644 index c920673605a4..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in-and-out.src.ts.shot +++ /dev/null @@ -1,645 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types optional-variance-in-and-out.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Mapper", - "optional": false, - "range": Array [ - 5, - 11, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 28, - 32, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 27, - 38, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": true, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 12, - 16, - ], - "type": "TSTypeParameter", - }, - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "U", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": true, - "range": Array [ - 18, - 23, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 11, - 24, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "type": "Identifier", - "value": "Mapper", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "value": "out", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 36, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in-out.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in-out.src.ts.shot deleted file mode 100644 index 7b510af72271..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in-out.src.ts.shot +++ /dev/null @@ -1,567 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types optional-variance-in-out.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Processor", - "optional": false, - "range": Array [ - 5, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 28, - 32, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 27, - 38, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": true, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": true, - "range": Array [ - 15, - 23, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 14, - 24, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 40, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 14, - ], - "type": "Identifier", - "value": "Processor", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 17, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "value": "out", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 36, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in.src.ts.shot deleted file mode 100644 index 13960d9cfa46..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-in.src.ts.shot +++ /dev/null @@ -1,527 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types optional-variance-in.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Consumer", - "optional": false, - "range": Array [ - 5, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "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": 36, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 23, - 27, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 22, - 36, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 36, - ], - "type": "TSVoidKeyword", - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": true, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 14, - 18, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 13, - 19, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 13, - ], - "type": "Identifier", - "value": "Consumer", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 16, - ], - "type": "Keyword", - "value": "in", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 36, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-out.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-out.src.ts.shot deleted file mode 100644 index 5bbd49f347fd..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/optional-variance-out.src.ts.shot +++ /dev/null @@ -1,418 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types optional-variance-out.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Provider", - "optional": false, - "range": Array [ - 5, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 31, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 23, - 30, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - "type": "TSFunctionType", - "typeParameters": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": undefined, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": true, - "range": Array [ - 14, - 19, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 13, - 20, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 13, - ], - "type": "Identifier", - "value": "Provider", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "out", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/parenthesized-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/parenthesized-type.src.ts.shot deleted file mode 100644 index a46af1bf983f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/parenthesized-type.src.ts.shot +++ /dev/null @@ -1,264 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types parenthesized-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 27, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 27, - ], - "type": "TSNumberKeyword", - }, - ], - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 27, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ")", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/reference-generic-nested.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/reference-generic-nested.src.ts.shot deleted file mode 100644 index 49cd9577c3ac..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/reference-generic-nested.src.ts.shot +++ /dev/null @@ -1,433 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types reference-generic-nested.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 27, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 27, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 27, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "Array", - "optional": false, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 26, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Array", - "optional": false, - "range": Array [ - 13, - 18, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 18, - 26, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "range": Array [ - 12, - 27, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 27, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "value": "Array", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 18, - ], - "type": "Identifier", - "value": "Array", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/reference-generic.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/reference-generic.src.ts.shot deleted file mode 100644 index a005225eba2f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/reference-generic.src.ts.shot +++ /dev/null @@ -1,322 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types reference-generic.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 20, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 20, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 20, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "Array", - "optional": false, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 19, - ], - "type": "TSNumberKeyword", - }, - ], - "range": Array [ - 12, - 20, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 20, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "value": "Array", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 19, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/reference.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/reference.src.ts.shot deleted file mode 100644 index ce1d48412410..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/reference.src.ts.shot +++ /dev/null @@ -1,233 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types reference.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 8, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 8, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-1.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-1.src.ts.shot deleted file mode 100644 index cca9f93240b7..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-1.src.ts.shot +++ /dev/null @@ -1,216 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types template-literal-type-1.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "literal": Object { - "expressions": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "foo", - "raw": "foo", - }, - }, - ], - "range": Array [ - 9, - 14, - ], - "type": "TemplateLiteral", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "TSLiteralType", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "type": "Template", - "value": "\`foo\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-2.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-2.src.ts.shot deleted file mode 100644 index 0988b939ff3b..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-2.src.ts.shot +++ /dev/null @@ -1,294 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types template-literal-type-2.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": "foo", - "raw": "foo", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "", - "raw": "", - }, - }, - ], - "range": Array [ - 9, - 22, - ], - "type": "TSTemplateLiteralType", - "types": Array [ - Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "TSLiteralType", - }, - ], - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Template", - "value": "\`foo\${", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "String", - "value": "'bar'", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "Template", - "value": "}\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-3.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-3.src.ts.shot deleted file mode 100644 index f1600354bd4a..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-3.src.ts.shot +++ /dev/null @@ -1,905 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types template-literal-type-3.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Color", - "optional": false, - "range": Array [ - 5, - 10, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 27, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 18, - ], - "raw": "\\"red\\"", - "type": "Literal", - "value": "red", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 18, - ], - "type": "TSLiteralType", - }, - Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 27, - ], - "raw": "\\"blue\\"", - "type": "Literal", - "value": "blue", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 27, - ], - "type": "TSLiteralType", - }, - ], - }, - "typeParameters": undefined, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Quantity", - "optional": false, - "range": Array [ - 34, - 42, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 29, - 59, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 58, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 50, - ], - "raw": "\\"one\\"", - "type": "Literal", - "value": "one", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 50, - ], - "type": "TSLiteralType", - }, - Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 53, - 58, - ], - "raw": "\\"two\\"", - "type": "Literal", - "value": "two", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 53, - 58, - ], - "type": "TSLiteralType", - }, - ], - }, - "typeParameters": undefined, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "SeussFish", - "optional": false, - "range": Array [ - 65, - 74, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 44, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 60, - 104, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 77, - 80, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": "", - "raw": "", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 96, - 103, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": " fish", - "raw": " fish", - }, - }, - ], - "range": Array [ - 77, - 103, - ], - "type": "TSTemplateLiteralType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 80, - 96, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 80, - 88, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "name": "Quantity", - "optional": false, - "range": Array [ - 80, - 88, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "range": Array [ - 91, - 96, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "name": "Color", - "optional": false, - "range": Array [ - 91, - 96, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - }, - ], - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 105, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 10, - ], - "type": "Identifier", - "value": "Color", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 18, - ], - "type": "String", - "value": "\\"red\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 27, - ], - "type": "String", - "value": "\\"blue\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 29, - 33, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 34, - 42, - ], - "type": "Identifier", - "value": "Quantity", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 50, - ], - "type": "String", - "value": "\\"one\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 53, - 58, - ], - "type": "String", - "value": "\\"two\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 29, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 60, - 64, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 65, - 74, - ], - "type": "Identifier", - "value": "SeussFish", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 77, - 80, - ], - "type": "Template", - "value": "\`\${", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 80, - 88, - ], - "type": "Identifier", - "value": "Quantity", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 29, - "line": 3, - }, - }, - "range": Array [ - 89, - 90, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "range": Array [ - 91, - 96, - ], - "type": "Identifier", - "value": "Color", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 36, - "line": 3, - }, - }, - "range": Array [ - 96, - 103, - ], - "type": "Template", - "value": "} fish\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 3, - }, - "start": Object { - "column": 43, - "line": 3, - }, - }, - "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-4.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-4.src.ts.shot deleted file mode 100644 index 1a71387ccff7..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/template-literal-type-4.src.ts.shot +++ /dev/null @@ -1,1475 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types template-literal-type-4.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "EnthusiasticGreeting", - "optional": false, - "range": Array [ - 5, - 25, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 122, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 122, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 121, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "quasis": Array [ - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 49, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": "", - "raw": "", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 67, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "range": Array [ - 61, - 67, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": " - ", - "raw": " - ", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 85, - "line": 1, - }, - "start": Object { - "column": 79, - "line": 1, - }, - }, - "range": Array [ - 79, - 85, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": " - ", - "raw": " - ", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 104, - "line": 1, - }, - "start": Object { - "column": 98, - "line": 1, - }, - }, - "range": Array [ - 98, - 104, - ], - "tail": false, - "type": "TemplateElement", - "value": Object { - "cooked": " - ", - "raw": " - ", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 121, - "line": 1, - }, - "start": Object { - "column": 119, - "line": 1, - }, - }, - "range": Array [ - 119, - 121, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "", - "raw": "", - }, - }, - ], - "range": Array [ - 46, - 121, - ], - "type": "TSTemplateLiteralType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 61, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "name": "Uppercase", - "optional": false, - "range": Array [ - 49, - 58, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 1, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 60, - "line": 1, - }, - "start": Object { - "column": 59, - "line": 1, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 60, - "line": 1, - }, - "start": Object { - "column": 59, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 58, - 61, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 1, - }, - "start": Object { - "column": 67, - "line": 1, - }, - }, - "range": Array [ - 67, - 79, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 76, - "line": 1, - }, - "start": Object { - "column": 67, - "line": 1, - }, - }, - "name": "Lowercase", - "optional": false, - "range": Array [ - 67, - 76, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 1, - }, - "start": Object { - "column": 76, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 78, - "line": 1, - }, - "start": Object { - "column": 77, - "line": 1, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 78, - "line": 1, - }, - "start": Object { - "column": 77, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 77, - 78, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 76, - 79, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 98, - "line": 1, - }, - "start": Object { - "column": 85, - "line": 1, - }, - }, - "range": Array [ - 85, - 98, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 95, - "line": 1, - }, - "start": Object { - "column": 85, - "line": 1, - }, - }, - "name": "Capitalize", - "optional": false, - "range": Array [ - 85, - 95, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 98, - "line": 1, - }, - "start": Object { - "column": 95, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 97, - "line": 1, - }, - "start": Object { - "column": 96, - "line": 1, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 97, - "line": 1, - }, - "start": Object { - "column": 96, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 96, - 97, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 95, - 98, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 119, - "line": 1, - }, - "start": Object { - "column": 104, - "line": 1, - }, - }, - "range": Array [ - 104, - 119, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 116, - "line": 1, - }, - "start": Object { - "column": 104, - "line": 1, - }, - }, - "name": "Uncapitalize", - "optional": false, - "range": Array [ - 104, - 116, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 119, - "line": 1, - }, - "start": Object { - "column": 116, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 118, - "line": 1, - }, - "start": Object { - "column": 117, - "line": 1, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 118, - "line": 1, - }, - "start": Object { - "column": 117, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 117, - 118, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 116, - 119, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "TSStringKeyword", - }, - "default": undefined, - "in": false, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "out": false, - "range": Array [ - 26, - 42, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 25, - 43, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "HELLO", - "optional": false, - "range": Array [ - 128, - 133, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 123, - 166, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 136, - 165, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "EnthusiasticGreeting", - "optional": false, - "range": Array [ - 136, - 156, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "params": Array [ - Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 157, - 164, - ], - "raw": "\\"heLLo\\"", - "type": "Literal", - "value": "heLLo", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 157, - 164, - ], - "type": "TSLiteralType", - }, - ], - "range": Array [ - 156, - 165, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 167, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 25, - ], - "type": "Identifier", - "value": "EnthusiasticGreeting", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 35, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 1, - }, - "start": Object { - "column": 46, - "line": 1, - }, - }, - "range": Array [ - 46, - 49, - ], - "type": "Template", - "value": "\`\${", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 49, - "line": 1, - }, - }, - "range": Array [ - 49, - 58, - ], - "type": "Identifier", - "value": "Uppercase", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 1, - }, - "start": Object { - "column": 58, - "line": 1, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 60, - "line": 1, - }, - "start": Object { - "column": 59, - "line": 1, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 1, - }, - "start": Object { - "column": 60, - "line": 1, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 67, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "range": Array [ - 61, - 67, - ], - "type": "Template", - "value": "} - \${", - }, - Object { - "loc": Object { - "end": Object { - "column": 76, - "line": 1, - }, - "start": Object { - "column": 67, - "line": 1, - }, - }, - "range": Array [ - 67, - 76, - ], - "type": "Identifier", - "value": "Lowercase", - }, - Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 76, - "line": 1, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 78, - "line": 1, - }, - "start": Object { - "column": 77, - "line": 1, - }, - }, - "range": Array [ - 77, - 78, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 79, - "line": 1, - }, - "start": Object { - "column": 78, - "line": 1, - }, - }, - "range": Array [ - 78, - 79, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 85, - "line": 1, - }, - "start": Object { - "column": 79, - "line": 1, - }, - }, - "range": Array [ - 79, - 85, - ], - "type": "Template", - "value": "} - \${", - }, - Object { - "loc": Object { - "end": Object { - "column": 95, - "line": 1, - }, - "start": Object { - "column": 85, - "line": 1, - }, - }, - "range": Array [ - 85, - 95, - ], - "type": "Identifier", - "value": "Capitalize", - }, - Object { - "loc": Object { - "end": Object { - "column": 96, - "line": 1, - }, - "start": Object { - "column": 95, - "line": 1, - }, - }, - "range": Array [ - 95, - 96, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 97, - "line": 1, - }, - "start": Object { - "column": 96, - "line": 1, - }, - }, - "range": Array [ - 96, - 97, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 98, - "line": 1, - }, - "start": Object { - "column": 97, - "line": 1, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 104, - "line": 1, - }, - "start": Object { - "column": 98, - "line": 1, - }, - }, - "range": Array [ - 98, - 104, - ], - "type": "Template", - "value": "} - \${", - }, - Object { - "loc": Object { - "end": Object { - "column": 116, - "line": 1, - }, - "start": Object { - "column": 104, - "line": 1, - }, - }, - "range": Array [ - 104, - 116, - ], - "type": "Identifier", - "value": "Uncapitalize", - }, - Object { - "loc": Object { - "end": Object { - "column": 117, - "line": 1, - }, - "start": Object { - "column": 116, - "line": 1, - }, - }, - "range": Array [ - 116, - 117, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 118, - "line": 1, - }, - "start": Object { - "column": 117, - "line": 1, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 119, - "line": 1, - }, - "start": Object { - "column": 118, - "line": 1, - }, - }, - "range": Array [ - 118, - 119, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 121, - "line": 1, - }, - "start": Object { - "column": 119, - "line": 1, - }, - }, - "range": Array [ - 119, - 121, - ], - "type": "Template", - "value": "}\`", - }, - Object { - "loc": Object { - "end": Object { - "column": 122, - "line": 1, - }, - "start": Object { - "column": 121, - "line": 1, - }, - }, - "range": Array [ - 121, - 122, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 123, - 127, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 128, - 133, - ], - "type": "Identifier", - "value": "HELLO", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 134, - 135, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 136, - 156, - ], - "type": "Identifier", - "value": "EnthusiasticGreeting", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 156, - 157, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 157, - 164, - ], - "type": "String", - "value": "\\"heLLo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 164, - 165, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 42, - "line": 2, - }, - }, - "range": Array [ - 165, - 166, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot deleted file mode 100644 index bb1c7246b8d2..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot +++ /dev/null @@ -1,4234 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types this-type-expanded.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": "public", - "computed": false, - "declare": false, - "decorators": Array [], - "definite": false, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 12, - 29, - ], - "readonly": false, - "static": false, - "type": "PropertyDefinition", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 20, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSNumberKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "public", - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "method", - "optional": false, - "range": Array [ - 40, - 46, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 33, - 91, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 80, - 84, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 85, - 86, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 80, - 86, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 73, - 87, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 36, - "line": 4, - }, - }, - "range": Array [ - 67, - 91, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "name": "this", - "optional": false, - "range": Array [ - 47, - 57, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 4, - }, - }, - "range": Array [ - 51, - 57, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 22, - "line": 4, - }, - }, - "range": Array [ - 53, - 57, - ], - "type": "TSThisType", - }, - }, - }, - ], - "range": Array [ - 46, - 91, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 58, - 66, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 29, - "line": 4, - }, - }, - "range": Array [ - 60, - 66, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": "public", - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "name": "method2", - "optional": false, - "range": Array [ - 102, - 109, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 95, - 149, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 138, - 142, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 9, - }, - "start": Object { - "column": 16, - "line": 9, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 143, - 144, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 138, - 144, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 131, - 145, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 10, - }, - "start": Object { - "column": 32, - "line": 8, - }, - }, - "range": Array [ - 125, - 149, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 10, - }, - "start": Object { - "column": 16, - "line": 8, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 8, - }, - "start": Object { - "column": 17, - "line": 8, - }, - }, - "name": "this", - "optional": false, - "range": Array [ - 110, - 117, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 8, - }, - "start": Object { - "column": 21, - "line": 8, - }, - }, - "range": Array [ - 114, - 117, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 8, - }, - "start": Object { - "column": 23, - "line": 8, - }, - }, - "range": Array [ - 116, - 117, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 8, - }, - "start": Object { - "column": 23, - "line": 8, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 116, - 117, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 109, - 149, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 8, - }, - "start": Object { - "column": 25, - "line": 8, - }, - }, - "range": Array [ - 118, - 124, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 8, - }, - "start": Object { - "column": 27, - "line": 8, - }, - }, - "range": Array [ - 120, - 124, - ], - "type": "TSThisType", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": "public", - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 12, - }, - }, - "name": "method3", - "optional": false, - "range": Array [ - 160, - 167, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 15, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 153, - 237, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 198, - 200, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 13, - }, - "start": Object { - "column": 19, - "line": 13, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 13, - }, - "start": Object { - "column": 19, - "line": 13, - }, - }, - "range": Array [ - 209, - 213, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 13, - }, - "start": Object { - "column": 24, - "line": 13, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 214, - 215, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 209, - 215, - ], - "type": "MemberExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 13, - }, - "start": Object { - "column": 13, - "line": 13, - }, - }, - "params": Array [], - "range": Array [ - 203, - 215, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "range": Array [ - 198, - 215, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 26, - "line": 13, - }, - "start": Object { - "column": 4, - "line": 13, - }, - }, - "range": Array [ - 194, - 216, - ], - "type": "VariableDeclaration", - }, - Object { - "argument": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 14, - }, - "start": Object { - "column": 11, - "line": 14, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 228, - 230, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 14, - }, - "start": Object { - "column": 11, - "line": 14, - }, - }, - "optional": false, - "range": Array [ - 228, - 232, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 14, - }, - }, - "range": Array [ - 221, - 233, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 15, - }, - "start": Object { - "column": 37, - "line": 12, - }, - }, - "range": Array [ - 188, - 237, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 15, - }, - "start": Object { - "column": 16, - "line": 12, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 12, - }, - "start": Object { - "column": 17, - "line": 12, - }, - }, - "name": "this", - "optional": false, - "range": Array [ - 168, - 178, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 12, - }, - "start": Object { - "column": 21, - "line": 12, - }, - }, - "range": Array [ - 172, - 178, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 12, - }, - "start": Object { - "column": 23, - "line": 12, - }, - }, - "range": Array [ - 174, - 178, - ], - "type": "TSThisType", - }, - }, - }, - ], - "range": Array [ - 167, - 237, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 12, - }, - "start": Object { - "column": 28, - "line": 12, - }, - }, - "range": Array [ - 179, - 187, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 12, - }, - "start": Object { - "column": 30, - "line": 12, - }, - }, - "range": Array [ - 181, - 187, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": "public", - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 17, - }, - "start": Object { - "column": 9, - "line": 17, - }, - }, - "name": "method4", - "optional": false, - "range": Array [ - 248, - 255, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 20, - }, - "start": Object { - "column": 2, - "line": 17, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 241, - 322, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 18, - }, - "start": Object { - "column": 8, - "line": 18, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 283, - 285, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "init": Object { - "async": false, - "body": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 18, - }, - "start": Object { - "column": 19, - "line": 18, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 18, - }, - "start": Object { - "column": 19, - "line": 18, - }, - }, - "range": Array [ - 294, - 298, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 18, - }, - "start": Object { - "column": 24, - "line": 18, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 299, - 300, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 294, - 300, - ], - "type": "MemberExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 18, - }, - "start": Object { - "column": 13, - "line": 18, - }, - }, - "params": Array [], - "range": Array [ - 288, - 300, - ], - "returnType": undefined, - "type": "ArrowFunctionExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 18, - }, - "start": Object { - "column": 8, - "line": 18, - }, - }, - "range": Array [ - 283, - 300, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "var", - "loc": Object { - "end": Object { - "column": 26, - "line": 18, - }, - "start": Object { - "column": 4, - "line": 18, - }, - }, - "range": Array [ - 279, - 301, - ], - "type": "VariableDeclaration", - }, - Object { - "argument": Object { - "arguments": Array [], - "callee": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 19, - }, - "start": Object { - "column": 11, - "line": 19, - }, - }, - "name": "fn", - "optional": false, - "range": Array [ - 313, - 315, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 19, - }, - "start": Object { - "column": 11, - "line": 19, - }, - }, - "optional": false, - "range": Array [ - 313, - 317, - ], - "type": "CallExpression", - "typeParameters": undefined, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 19, - }, - "start": Object { - "column": 4, - "line": 19, - }, - }, - "range": Array [ - 306, - 318, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 20, - }, - "start": Object { - "column": 34, - "line": 17, - }, - }, - "range": Array [ - 273, - 322, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 20, - }, - "start": Object { - "column": 16, - "line": 17, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 17, - }, - "start": Object { - "column": 17, - "line": 17, - }, - }, - "name": "this", - "optional": false, - "range": Array [ - 256, - 263, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 17, - }, - "start": Object { - "column": 21, - "line": 17, - }, - }, - "range": Array [ - 260, - 263, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 17, - }, - "start": Object { - "column": 23, - "line": 17, - }, - }, - "range": Array [ - 262, - 263, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 17, - }, - "start": Object { - "column": 23, - "line": 17, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 262, - 263, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 255, - 322, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 17, - }, - "start": Object { - "column": 25, - "line": 17, - }, - }, - "range": Array [ - 264, - 272, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 17, - }, - "start": Object { - "column": 27, - "line": 17, - }, - }, - "range": Array [ - 266, - 272, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 22, - }, - "start": Object { - "column": 9, - "line": 22, - }, - }, - "name": "staticMethod", - "optional": false, - "range": Array [ - 333, - 345, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 24, - }, - "start": Object { - "column": 2, - "line": 22, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 326, - 387, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 17, - "line": 23, - }, - "start": Object { - "column": 11, - "line": 23, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 23, - }, - "start": Object { - "column": 11, - "line": 23, - }, - }, - "range": Array [ - 376, - 380, - ], - "type": "ThisExpression", - }, - "optional": false, - "property": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 23, - }, - "start": Object { - "column": 16, - "line": 23, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 381, - 382, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "range": Array [ - 376, - 382, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 23, - }, - "start": Object { - "column": 4, - "line": 23, - }, - }, - "range": Array [ - 369, - 383, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 24, - }, - "start": Object { - "column": 39, - "line": 22, - }, - }, - "range": Array [ - 363, - 387, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 24, - }, - "start": Object { - "column": 21, - "line": 22, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 22, - }, - "start": Object { - "column": 22, - "line": 22, - }, - }, - "name": "this", - "optional": false, - "range": Array [ - 346, - 353, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 22, - }, - "start": Object { - "column": 26, - "line": 22, - }, - }, - "range": Array [ - 350, - 353, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 22, - }, - "start": Object { - "column": 28, - "line": 22, - }, - }, - "range": Array [ - 352, - 353, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 29, - "line": 22, - }, - "start": Object { - "column": 28, - "line": 22, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 352, - 353, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 345, - 387, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 22, - }, - "start": Object { - "column": 30, - "line": 22, - }, - }, - "range": Array [ - 354, - 362, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 22, - }, - "start": Object { - "column": 32, - "line": 22, - }, - }, - "range": Array [ - 356, - 362, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 26, - }, - "start": Object { - "column": 9, - "line": 26, - }, - }, - "name": "typeof", - "optional": false, - "range": Array [ - 398, - 404, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 28, - }, - "start": Object { - "column": 2, - "line": 26, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 391, - 449, - ], - "static": true, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 27, - }, - "start": Object { - "column": 18, - "line": 27, - }, - }, - "range": Array [ - 440, - 444, - ], - "type": "ThisExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 27, - }, - "start": Object { - "column": 11, - "line": 27, - }, - }, - "operator": "typeof", - "prefix": true, - "range": Array [ - 433, - 444, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 27, - }, - "start": Object { - "column": 4, - "line": 27, - }, - }, - "range": Array [ - 426, - 445, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 28, - }, - "start": Object { - "column": 31, - "line": 26, - }, - }, - "range": Array [ - 420, - 449, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 28, - }, - "start": Object { - "column": 15, - "line": 26, - }, - }, - "params": Array [ - Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 26, - }, - "start": Object { - "column": 16, - "line": 26, - }, - }, - "name": "this", - "optional": false, - "range": Array [ - 405, - 412, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 26, - }, - "start": Object { - "column": 20, - "line": 26, - }, - }, - "range": Array [ - 409, - 412, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 26, - }, - "start": Object { - "column": 22, - "line": 26, - }, - }, - "range": Array [ - 411, - 412, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 26, - }, - "start": Object { - "column": 22, - "line": 26, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 411, - 412, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - ], - "range": Array [ - 404, - 449, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 26, - }, - "start": Object { - "column": 24, - "line": 26, - }, - }, - "range": Array [ - 413, - 419, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 26, - }, - "start": Object { - "column": 26, - "line": 26, - }, - }, - "range": Array [ - 415, - 419, - ], - "type": "TSThisType", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 29, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 451, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "A", - "optional": false, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 29, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 451, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 30, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 452, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 18, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 33, - 39, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "Identifier", - "value": "method", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 47, - 51, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 4, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 22, - "line": 4, - }, - }, - "range": Array [ - 53, - 57, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 57, - 58, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 29, - "line": 4, - }, - }, - "range": Array [ - 60, - 66, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 36, - "line": 4, - }, - }, - "range": Array [ - 67, - 68, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 73, - 79, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 80, - 84, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 84, - 85, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 85, - 86, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, - }, - }, - "range": Array [ - 90, - 91, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 2, - "line": 8, - }, - }, - "range": Array [ - 95, - 101, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "range": Array [ - 102, - 109, - ], - "type": "Identifier", - "value": "method2", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 8, - }, - "start": Object { - "column": 16, - "line": 8, - }, - }, - "range": Array [ - 109, - 110, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 8, - }, - "start": Object { - "column": 17, - "line": 8, - }, - }, - "range": Array [ - 110, - 114, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 8, - }, - "start": Object { - "column": 21, - "line": 8, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 8, - }, - "start": Object { - "column": 23, - "line": 8, - }, - }, - "range": Array [ - 116, - 117, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 8, - }, - "start": Object { - "column": 24, - "line": 8, - }, - }, - "range": Array [ - 117, - 118, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 8, - }, - "start": Object { - "column": 25, - "line": 8, - }, - }, - "range": Array [ - 118, - 119, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 8, - }, - "start": Object { - "column": 27, - "line": 8, - }, - }, - "range": Array [ - 120, - 124, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 8, - }, - "start": Object { - "column": 32, - "line": 8, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "range": Array [ - 131, - 137, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 138, - 142, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 15, - "line": 9, - }, - }, - "range": Array [ - 142, - 143, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 9, - }, - "start": Object { - "column": 16, - "line": 9, - }, - }, - "range": Array [ - 143, - 144, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "range": Array [ - 144, - 145, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 10, - }, - "start": Object { - "column": 2, - "line": 10, - }, - }, - "range": Array [ - 148, - 149, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 12, - }, - "start": Object { - "column": 2, - "line": 12, - }, - }, - "range": Array [ - 153, - 159, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 12, - }, - }, - "range": Array [ - 160, - 167, - ], - "type": "Identifier", - "value": "method3", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 12, - }, - "start": Object { - "column": 16, - "line": 12, - }, - }, - "range": Array [ - 167, - 168, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 12, - }, - "start": Object { - "column": 17, - "line": 12, - }, - }, - "range": Array [ - 168, - 172, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 12, - }, - "start": Object { - "column": 21, - "line": 12, - }, - }, - "range": Array [ - 172, - 173, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 12, - }, - "start": Object { - "column": 23, - "line": 12, - }, - }, - "range": Array [ - 174, - 178, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 12, - }, - "start": Object { - "column": 27, - "line": 12, - }, - }, - "range": Array [ - 178, - 179, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 12, - }, - "start": Object { - "column": 28, - "line": 12, - }, - }, - "range": Array [ - 179, - 180, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 12, - }, - "start": Object { - "column": 30, - "line": 12, - }, - }, - "range": Array [ - 181, - 187, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 12, - }, - "start": Object { - "column": 37, - "line": 12, - }, - }, - "range": Array [ - 188, - 189, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 13, - }, - "start": Object { - "column": 4, - "line": 13, - }, - }, - "range": Array [ - 194, - 197, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "range": Array [ - 198, - 200, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 13, - }, - "start": Object { - "column": 11, - "line": 13, - }, - }, - "range": Array [ - 201, - 202, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 13, - }, - "start": Object { - "column": 13, - "line": 13, - }, - }, - "range": Array [ - 203, - 204, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 13, - }, - "start": Object { - "column": 14, - "line": 13, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 13, - }, - "start": Object { - "column": 16, - "line": 13, - }, - }, - "range": Array [ - 206, - 208, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 13, - }, - "start": Object { - "column": 19, - "line": 13, - }, - }, - "range": Array [ - 209, - 213, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 13, - }, - "start": Object { - "column": 23, - "line": 13, - }, - }, - "range": Array [ - 213, - 214, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 13, - }, - "start": Object { - "column": 24, - "line": 13, - }, - }, - "range": Array [ - 214, - 215, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 13, - }, - "start": Object { - "column": 25, - "line": 13, - }, - }, - "range": Array [ - 215, - 216, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 14, - }, - }, - "range": Array [ - 221, - 227, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 14, - }, - "start": Object { - "column": 11, - "line": 14, - }, - }, - "range": Array [ - 228, - 230, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 14, - }, - "start": Object { - "column": 13, - "line": 14, - }, - }, - "range": Array [ - 230, - 231, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 14, - }, - "start": Object { - "column": 14, - "line": 14, - }, - }, - "range": Array [ - 231, - 232, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 14, - }, - "start": Object { - "column": 15, - "line": 14, - }, - }, - "range": Array [ - 232, - 233, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 15, - }, - "start": Object { - "column": 2, - "line": 15, - }, - }, - "range": Array [ - 236, - 237, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 17, - }, - "start": Object { - "column": 2, - "line": 17, - }, - }, - "range": Array [ - 241, - 247, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 17, - }, - "start": Object { - "column": 9, - "line": 17, - }, - }, - "range": Array [ - 248, - 255, - ], - "type": "Identifier", - "value": "method4", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 17, - }, - "start": Object { - "column": 16, - "line": 17, - }, - }, - "range": Array [ - 255, - 256, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 17, - }, - "start": Object { - "column": 17, - "line": 17, - }, - }, - "range": Array [ - 256, - 260, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 17, - }, - "start": Object { - "column": 21, - "line": 17, - }, - }, - "range": Array [ - 260, - 261, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 17, - }, - "start": Object { - "column": 23, - "line": 17, - }, - }, - "range": Array [ - 262, - 263, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 17, - }, - "start": Object { - "column": 24, - "line": 17, - }, - }, - "range": Array [ - 263, - 264, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 17, - }, - "start": Object { - "column": 25, - "line": 17, - }, - }, - "range": Array [ - 264, - 265, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 17, - }, - "start": Object { - "column": 27, - "line": 17, - }, - }, - "range": Array [ - 266, - 272, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 17, - }, - "start": Object { - "column": 34, - "line": 17, - }, - }, - "range": Array [ - 273, - 274, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 18, - }, - "start": Object { - "column": 4, - "line": 18, - }, - }, - "range": Array [ - 279, - 282, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 18, - }, - "start": Object { - "column": 8, - "line": 18, - }, - }, - "range": Array [ - 283, - 285, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 18, - }, - "start": Object { - "column": 11, - "line": 18, - }, - }, - "range": Array [ - 286, - 287, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 18, - }, - "start": Object { - "column": 13, - "line": 18, - }, - }, - "range": Array [ - 288, - 289, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 18, - }, - "start": Object { - "column": 14, - "line": 18, - }, - }, - "range": Array [ - 289, - 290, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 18, - }, - "start": Object { - "column": 16, - "line": 18, - }, - }, - "range": Array [ - 291, - 293, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 18, - }, - "start": Object { - "column": 19, - "line": 18, - }, - }, - "range": Array [ - 294, - 298, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 18, - }, - "start": Object { - "column": 23, - "line": 18, - }, - }, - "range": Array [ - 298, - 299, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 18, - }, - "start": Object { - "column": 24, - "line": 18, - }, - }, - "range": Array [ - 299, - 300, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 18, - }, - "start": Object { - "column": 25, - "line": 18, - }, - }, - "range": Array [ - 300, - 301, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 19, - }, - "start": Object { - "column": 4, - "line": 19, - }, - }, - "range": Array [ - 306, - 312, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 19, - }, - "start": Object { - "column": 11, - "line": 19, - }, - }, - "range": Array [ - 313, - 315, - ], - "type": "Identifier", - "value": "fn", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 19, - }, - "start": Object { - "column": 13, - "line": 19, - }, - }, - "range": Array [ - 315, - 316, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 19, - }, - "start": Object { - "column": 14, - "line": 19, - }, - }, - "range": Array [ - 316, - 317, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 19, - }, - "start": Object { - "column": 15, - "line": 19, - }, - }, - "range": Array [ - 317, - 318, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 20, - }, - "start": Object { - "column": 2, - "line": 20, - }, - }, - "range": Array [ - 321, - 322, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 22, - }, - "start": Object { - "column": 2, - "line": 22, - }, - }, - "range": Array [ - 326, - 332, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 22, - }, - "start": Object { - "column": 9, - "line": 22, - }, - }, - "range": Array [ - 333, - 345, - ], - "type": "Identifier", - "value": "staticMethod", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 22, - }, - "start": Object { - "column": 21, - "line": 22, - }, - }, - "range": Array [ - 345, - 346, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 22, - }, - "start": Object { - "column": 22, - "line": 22, - }, - }, - "range": Array [ - 346, - 350, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 22, - }, - "start": Object { - "column": 26, - "line": 22, - }, - }, - "range": Array [ - 350, - 351, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 22, - }, - "start": Object { - "column": 28, - "line": 22, - }, - }, - "range": Array [ - 352, - 353, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 22, - }, - "start": Object { - "column": 29, - "line": 22, - }, - }, - "range": Array [ - 353, - 354, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 22, - }, - "start": Object { - "column": 30, - "line": 22, - }, - }, - "range": Array [ - 354, - 355, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 22, - }, - "start": Object { - "column": 32, - "line": 22, - }, - }, - "range": Array [ - 356, - 362, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 22, - }, - "start": Object { - "column": 39, - "line": 22, - }, - }, - "range": Array [ - 363, - 364, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 23, - }, - "start": Object { - "column": 4, - "line": 23, - }, - }, - "range": Array [ - 369, - 375, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 23, - }, - "start": Object { - "column": 11, - "line": 23, - }, - }, - "range": Array [ - 376, - 380, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 23, - }, - "start": Object { - "column": 15, - "line": 23, - }, - }, - "range": Array [ - 380, - 381, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 23, - }, - "start": Object { - "column": 16, - "line": 23, - }, - }, - "range": Array [ - 381, - 382, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 23, - }, - "start": Object { - "column": 17, - "line": 23, - }, - }, - "range": Array [ - 382, - 383, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 24, - }, - "start": Object { - "column": 2, - "line": 24, - }, - }, - "range": Array [ - 386, - 387, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 26, - }, - "start": Object { - "column": 2, - "line": 26, - }, - }, - "range": Array [ - 391, - 397, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 26, - }, - "start": Object { - "column": 9, - "line": 26, - }, - }, - "range": Array [ - 398, - 404, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 26, - }, - "start": Object { - "column": 15, - "line": 26, - }, - }, - "range": Array [ - 404, - 405, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 26, - }, - "start": Object { - "column": 16, - "line": 26, - }, - }, - "range": Array [ - 405, - 409, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 26, - }, - "start": Object { - "column": 20, - "line": 26, - }, - }, - "range": Array [ - 409, - 410, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 26, - }, - "start": Object { - "column": 22, - "line": 26, - }, - }, - "range": Array [ - 411, - 412, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 26, - }, - "start": Object { - "column": 23, - "line": 26, - }, - }, - "range": Array [ - 412, - 413, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 26, - }, - "start": Object { - "column": 24, - "line": 26, - }, - }, - "range": Array [ - 413, - 414, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 26, - }, - "start": Object { - "column": 26, - "line": 26, - }, - }, - "range": Array [ - 415, - 419, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 26, - }, - "start": Object { - "column": 31, - "line": 26, - }, - }, - "range": Array [ - 420, - 421, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 27, - }, - "start": Object { - "column": 4, - "line": 27, - }, - }, - "range": Array [ - 426, - 432, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 27, - }, - "start": Object { - "column": 11, - "line": 27, - }, - }, - "range": Array [ - 433, - 439, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 27, - }, - "start": Object { - "column": 18, - "line": 27, - }, - }, - "range": Array [ - 440, - 444, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 27, - }, - "start": Object { - "column": 22, - "line": 27, - }, - }, - "range": Array [ - 444, - 445, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 28, - }, - "start": Object { - "column": 2, - "line": 28, - }, - }, - "range": Array [ - 448, - 449, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 29, - }, - "start": Object { - "column": 0, - "line": 29, - }, - }, - "range": Array [ - 450, - 451, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/this-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/this-type.src.ts.shot deleted file mode 100644 index dfb9f035b1e6..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/this-type.src.ts.shot +++ /dev/null @@ -1,500 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types this-type.src 1`] = ` -Object { - "body": Array [ - Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "accessibility": undefined, - "computed": false, - "decorators": Array [], - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "clone", - "optional": false, - "range": Array [ - 18, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": false, - "override": false, - "range": Array [ - 18, - 54, - ], - "static": false, - "type": "MethodDefinition", - "typeParameters": undefined, - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 45, - 49, - ], - "type": "ThisExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 38, - 50, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 54, - ], - "type": "BlockStatement", - }, - "declare": false, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 23, - 54, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "TSThisType", - }, - }, - "type": "FunctionExpression", - "typeParameters": undefined, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 56, - ], - "type": "ClassBody", - }, - "declare": false, - "decorators": Array [], - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Message", - "optional": false, - "range": Array [ - 6, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "implements": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 56, - ], - "superClass": null, - "superTypeParameters": undefined, - "type": "ClassDeclaration", - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 57, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 13, - ], - "type": "Identifier", - "value": "Message", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 18, - 23, - ], - "type": "Identifier", - "value": "clone", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 45, - 49, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-empty.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-empty.src.ts.shot deleted file mode 100644 index 31ef4b0b1768..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-empty.src.ts.shot +++ /dev/null @@ -1,230 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types tuple-empty.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 9, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 9, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementTypes": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 9, - ], - "type": "TSTupleType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 9, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-optional.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-optional.src.ts.shot deleted file mode 100644 index 492c7640640d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-optional.src.ts.shot +++ /dev/null @@ -1,723 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types tuple-named-optional.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 53, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 53, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementTypes": Array [ - Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSStringKeyword", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 8, - 17, - ], - "type": "TSNamedTupleMember", - }, - Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "TSNumberKeyword", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "optional": true, - "range": Array [ - 19, - 29, - ], - "type": "TSNamedTupleMember", - }, - Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 51, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 51, - ], - "type": "TSNumberKeyword", - }, - ], - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "optional": true, - "range": Array [ - 31, - 52, - ], - "type": "TSNamedTupleMember", - }, - ], - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 53, - ], - "type": "TSTupleType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 53, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 53, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 54, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 51, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 52, - "line": 1, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "]", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-rest.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-rest.src.ts.shot deleted file mode 100644 index 11505c596b03..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-rest.src.ts.shot +++ /dev/null @@ -1,539 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types tuple-named-rest.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 34, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 34, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementTypes": Array [ - Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSStringKeyword", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 8, - 17, - ], - "type": "TSNamedTupleMember", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 33, - ], - "type": "TSRestType", - "typeAnnotation": Object { - "elementType": Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "TSNumberKeyword", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 33, - ], - "type": "TSArrayType", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 22, - 33, - ], - "type": "TSNamedTupleMember", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 34, - ], - "type": "TSTupleType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 34, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "]", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-type.src.ts.shot deleted file mode 100644 index f7ba56338161..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-type.src.ts.shot +++ /dev/null @@ -1,432 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types tuple-named-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 34, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "elementTypes": Array [ - Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "type": "TSStringKeyword", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 12, - 21, - ], - "type": "TSNamedTupleMember", - }, - Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "TSStringKeyword", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "optional": true, - "range": Array [ - 23, - 33, - ], - "type": "TSNamedTupleMember", - }, - ], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 34, - ], - "type": "TSTupleType", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 33, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "]", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named.src.ts.shot deleted file mode 100644 index a86de6ac7716..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named.src.ts.shot +++ /dev/null @@ -1,597 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types tuple-named.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 40, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 40, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementTypes": Array [ - Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSNumberKeyword", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "a", - "optional": false, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 8, - 17, - ], - "type": "TSNamedTupleMember", - }, - Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSNumberKeyword", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "b", - "optional": false, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 19, - 28, - ], - "type": "TSNamedTupleMember", - }, - Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 39, - ], - "type": "TSNumberKeyword", - }, - "label": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "c", - "optional": false, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 30, - 39, - ], - "type": "TSNamedTupleMember", - }, - ], - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 40, - ], - "type": "TSTupleType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 40, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 41, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 39, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-optional.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-optional.src.ts.shot deleted file mode 100644 index ad8897ffae0c..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-optional.src.ts.shot +++ /dev/null @@ -1,532 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types tuple-optional.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 23, - ], - "type": "TSOptionalType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "TSNumberKeyword", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 43, - ], - "type": "TSOptionalType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 41, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "TSNumberKeyword", - }, - ], - }, - }, - ], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 44, - ], - "type": "TSTupleType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 44, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 44, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 45, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 43, - "line": 1, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "]", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-rest.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-rest.src.ts.shot deleted file mode 100644 index 5171c6f702e6..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-rest.src.ts.shot +++ /dev/null @@ -1,389 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types tuple-rest.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 28, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 27, - ], - "type": "TSRestType", - "typeAnnotation": Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "TSNumberKeyword", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 27, - ], - "type": "TSArrayType", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 28, - ], - "type": "TSTupleType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 28, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 25, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "]", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-type.src.ts.shot deleted file mode 100644 index 6ee73194cf8f..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-type.src.ts.shot +++ /dev/null @@ -1,299 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types tuple-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 27, - ], - "type": "TSOptionalType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "TSStringKeyword", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 28, - ], - "type": "TSTupleType", - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "]", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/tuple.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/tuple.src.ts.shot deleted file mode 100644 index 95c64e158050..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/tuple.src.ts.shot +++ /dev/null @@ -1,372 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types tuple.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 31, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 31, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "TSNumberKeyword", - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 31, - ], - "type": "TSTupleType", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 31, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/type-literal.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/type-literal.src.ts.shot deleted file mode 100644 index 1e9de17e771d..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/type-literal.src.ts.shot +++ /dev/null @@ -1,364 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types type-literal.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "obj", - "optional": false, - "range": Array [ - 4, - 22, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 22, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "members": Array [ - Object { - "accessibility": undefined, - "computed": false, - "export": false, - "initializer": undefined, - "key": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "optional": false, - "range": Array [ - 11, - 20, - ], - "readonly": false, - "static": false, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 20, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], - "range": Array [ - 9, - 22, - ], - "type": "TSTypeLiteral", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 22, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 23, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "obj", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/type-operator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/type-operator.src.ts.shot deleted file mode 100644 index d983168c35e5..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/type-operator.src.ts.shot +++ /dev/null @@ -1,489 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types type-operator.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 14, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 14, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "operator": "keyof", - "range": Array [ - 7, - 14, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "T", - "optional": false, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 20, - 36, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 21, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "operator": "unique", - "range": Array [ - 23, - 36, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "TSSymbolKeyword", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 36, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 16, - 37, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "value": "keyof", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 23, - 29, - ], - "type": "Identifier", - "value": "unique", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Identifier", - "value": "symbol", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/typeof-this.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/typeof-this.src.ts.shot deleted file mode 100644 index 7c6652192d32..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/typeof-this.src.ts.shot +++ /dev/null @@ -1,541 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types typeof-this.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "self", - "optional": false, - "range": Array [ - 4, - 21, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 21, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "exprName": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "ThisExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 21, - ], - "type": "TSTypeQuery", - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 21, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 27, - 47, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 30, - 47, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "exprName": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 39, - 43, - ], - "type": "ThisExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 39, - 47, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "name": "foo", - "optional": false, - "range": Array [ - 44, - 47, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "TSQualifiedName", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 32, - 47, - ], - "type": "TSTypeQuery", - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 27, - 47, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 23, - 48, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 8, - ], - "type": "Identifier", - "value": "self", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 16, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 39, - 43, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 44, - 47, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/typeof-with-type-parameters.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/typeof-with-type-parameters.src.ts.shot deleted file mode 100644 index b31a86824188..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/typeof-with-type-parameters.src.ts.shot +++ /dev/null @@ -1,436 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types typeof-with-type-parameters.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 20, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 20, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "exprName": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "TSQualifiedName", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 20, - ], - "type": "TSTypeQuery", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "TSTypeReference", - "typeName": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "w", - "optional": false, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "typeParameters": undefined, - }, - ], - "range": Array [ - 17, - 20, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 20, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "w", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/typeof.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/typeof.src.ts.shot deleted file mode 100644 index 14ef83b33433..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/typeof.src.ts.shot +++ /dev/null @@ -1,325 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types typeof.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "optional": false, - "range": Array [ - 4, - 17, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 17, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "exprName": Object { - "left": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "y", - "optional": false, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "right": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "z", - "optional": false, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "type": "TSQualifiedName", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 17, - ], - "type": "TSTypeQuery", - "typeParameters": undefined, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 17, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/union-intersection.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/union-intersection.src.ts.shot deleted file mode 100644 index 613fbde6cd3e..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/union-intersection.src.ts.shot +++ /dev/null @@ -1,1248 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types union-intersection.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "union", - "optional": false, - "range": Array [ - 4, - 36, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 36, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 36, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "TSNullKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 36, - ], - "type": "TSUndefinedKeyword", - }, - ], - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 36, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "intersection", - "optional": false, - "range": Array [ - 42, - 71, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 54, - 71, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 56, - 71, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 56, - 62, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 65, - 71, - ], - "type": "TSStringKeyword", - }, - ], - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 42, - 71, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 38, - 72, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "precedence1", - "optional": false, - "range": Array [ - 77, - 115, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 88, - 115, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 90, - 115, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 90, - 96, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 99, - 115, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 99, - 105, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 35, - "line": 3, - }, - }, - "range": Array [ - 108, - 115, - ], - "type": "TSBooleanKeyword", - }, - ], - }, - ], - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 77, - 115, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 73, - 116, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "precedence2", - "optional": false, - "range": Array [ - 121, - 159, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 132, - 159, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 134, - 159, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 134, - 149, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 134, - 140, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 143, - 149, - ], - "type": "TSStringKeyword", - }, - ], - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 4, - }, - }, - "range": Array [ - 152, - 159, - ], - "type": "TSBooleanKeyword", - }, - ], - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 121, - 159, - ], - "type": "VariableDeclarator", - }, - ], - "declare": false, - "kind": "let", - "loc": Object { - "end": Object { - "column": 43, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 117, - 160, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 161, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 9, - ], - "type": "Identifier", - "value": "union", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "Keyword", - "value": "null", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 36, - ], - "type": "Identifier", - "value": "undefined", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 38, - 41, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 42, - 54, - ], - "type": "Identifier", - "value": "intersection", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 56, - 62, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 65, - 71, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 73, - 76, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 77, - 88, - ], - "type": "Identifier", - "value": "precedence1", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "range": Array [ - 90, - 96, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 97, - 98, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 99, - 105, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 35, - "line": 3, - }, - }, - "range": Array [ - 108, - 115, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 42, - "line": 3, - }, - }, - "range": Array [ - 115, - 116, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 117, - 120, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 121, - 132, - ], - "type": "Identifier", - "value": "precedence2", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 132, - 133, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 134, - 140, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 141, - 142, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 143, - 149, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 4, - }, - "start": Object { - "column": 33, - "line": 4, - }, - }, - "range": Array [ - 150, - 151, - ], - "type": "Punctuator", - "value": "|", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 4, - }, - }, - "range": Array [ - 152, - 159, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 4, - }, - "start": Object { - "column": 42, - "line": 4, - }, - }, - "range": Array [ - 159, - 160, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/union-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/union-type.src.ts.shot deleted file mode 100644 index b4b333c34ac9..000000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/types/union-type.src.ts.shot +++ /dev/null @@ -1,228 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript types union-type.src 1`] = ` -Object { - "body": Array [ - Object { - "declare": false, - "id": Object { - "decorators": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Foo", - "optional": false, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "typeAnnotation": undefined, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 26, - ], - "type": "TSIntersectionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "TSNumberKeyword", - }, - ], - }, - "typeParameters": undefined, - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "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": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "&", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "Identifier", - "value": "number", - }, - ], - "type": "Program", -} -`; From e429dae75ea0fa428a4e29fa135ff115b3292d88 Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Mon, 8 Jan 2024 19:31:35 +0300 Subject: [PATCH 049/165] fix(eslint-plugin): [no-non-null-assertion] provide valid fix when member access is on next line (#8185) * fix(eslint-plugin): [no-non-null-assertion] provide valid fix when member access is on next line * test: add new case --- .../src/rules/no-non-null-assertion.ts | 48 ++++----- .../tests/rules/no-non-null-assertion.test.ts | 98 ++++++++++++++++++- 2 files changed, 118 insertions(+), 28 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-non-null-assertion.ts b/packages/eslint-plugin/src/rules/no-non-null-assertion.ts index 25617ca41f25..f80d0ee00914 100644 --- a/packages/eslint-plugin/src/rules/no-non-null-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-non-null-assertion.ts @@ -29,33 +29,19 @@ export default createRule<[], MessageIds>({ return { TSNonNullExpression(node): void { const suggest: TSESLint.ReportSuggestionArray = []; - function convertTokenToOptional( - replacement: '?.' | '?', - ): TSESLint.ReportFixFunction { - return (fixer: TSESLint.RuleFixer): TSESLint.RuleFix | null => { - const operator = sourceCode.getTokenAfter( - node.expression, - isNonNullAssertionPunctuator, - ); - if (operator) { - return fixer.replaceText(operator, replacement); - } - return null; - }; + // it always exists in non-null assertion + const nonNullOperator = sourceCode.getTokenAfter( + node.expression, + isNonNullAssertionPunctuator, + )!; + + function replaceTokenWithOptional(): TSESLint.ReportFixFunction { + return fixer => fixer.replaceText(nonNullOperator, '?.'); } - function removeToken(): TSESLint.ReportFixFunction { - return (fixer: TSESLint.RuleFixer): TSESLint.RuleFix | null => { - const operator = sourceCode.getTokenAfter( - node.expression, - isNonNullAssertionPunctuator, - ); - if (operator) { - return fixer.remove(operator); - } - return null; - }; + function removeToken(): TSESLint.ReportFixFunction { + return fixer => fixer.remove(nonNullOperator); } if ( @@ -67,13 +53,21 @@ export default createRule<[], MessageIds>({ // it is x![y]?.z suggest.push({ messageId: 'suggestOptionalChain', - fix: convertTokenToOptional('?.'), + fix: replaceTokenWithOptional(), }); } else { // it is x!.y?.z suggest.push({ messageId: 'suggestOptionalChain', - fix: convertTokenToOptional('?'), + fix(fixer) { + // x!.y?.z + // ^ punctuator + const punctuator = sourceCode.getTokenAfter(nonNullOperator)!; + return [ + fixer.remove(nonNullOperator), + fixer.insertTextBefore(punctuator, '?'), + ]; + }, }); } } else { @@ -99,7 +93,7 @@ export default createRule<[], MessageIds>({ // it is x.y?.z!() suggest.push({ messageId: 'suggestOptionalChain', - fix: convertTokenToOptional('?.'), + fix: replaceTokenWithOptional(), }); } else { // it is x.y.z!?.() diff --git a/packages/eslint-plugin/tests/rules/no-non-null-assertion.test.ts b/packages/eslint-plugin/tests/rules/no-non-null-assertion.test.ts index 10dbb0d09c3c..d1a93c058d12 100644 --- a/packages/eslint-plugin/tests/rules/no-non-null-assertion.test.ts +++ b/packages/eslint-plugin/tests/rules/no-non-null-assertion.test.ts @@ -1,4 +1,4 @@ -import { RuleTester } from '@typescript-eslint/rule-tester'; +import { noFormat, RuleTester } from '@typescript-eslint/rule-tester'; import rule from '../../src/rules/no-non-null-assertion'; @@ -293,5 +293,101 @@ ruleTester.run('no-non-null-assertion', rule, { }, ], }, + { + code: noFormat` +x! +.y + `, + errors: [ + { + messageId: 'noNonNull', + line: 2, + column: 1, + suggestions: [ + { + messageId: 'suggestOptionalChain', + output: ` +x +?.y + `, + }, + ], + }, + ], + }, + { + code: noFormat` +x! +// comment +.y + `, + errors: [ + { + messageId: 'noNonNull', + line: 2, + column: 1, + suggestions: [ + { + messageId: 'suggestOptionalChain', + output: ` +x +// comment +?.y + `, + }, + ], + }, + ], + }, + { + code: noFormat` +x! + // comment + . /* comment */ + y + `, + errors: [ + { + messageId: 'noNonNull', + line: 2, + column: 1, + suggestions: [ + { + messageId: 'suggestOptionalChain', + output: ` +x + // comment + ?. /* comment */ + y + `, + }, + ], + }, + ], + }, + { + code: noFormat` +x! + // comment + /* comment */ ['y'] + `, + errors: [ + { + messageId: 'noNonNull', + line: 2, + column: 1, + suggestions: [ + { + messageId: 'suggestOptionalChain', + output: ` +x?. + // comment + /* comment */ ['y'] + `, + }, + ], + }, + ], + }, ], }); From f56e842cf7d2d50f016681df6a1557aa27e15a6b Mon Sep 17 00:00:00 2001 From: YeonJuan Date: Tue, 9 Jan 2024 01:35:21 +0900 Subject: [PATCH 050/165] fix(eslint-plugin): [no-unnecessary-condition] improve checking optional callee (#8178) --- .../src/rules/no-unnecessary-condition.ts | 29 +++- .../rules/no-unnecessary-condition.test.ts | 134 ++++++++++++++++++ 2 files changed, 160 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index 40787600143f..12a42398b3ee 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -547,7 +547,7 @@ export default createRule({ // declare const foo: { bar : { baz: string } } | null // foo?.bar; // ``` - function isNullableOriginFromPrev( + function isMemberExpressionNullableOriginFromObject( node: TSESTree.MemberExpression, ): boolean { const prevType = getConstrainedTypeAtLocation(services, node.object); @@ -580,12 +580,35 @@ export default createRule({ return false; } + function isCallExpressionNullableOriginFromCallee( + node: TSESTree.CallExpression, + ): boolean { + const prevType = getConstrainedTypeAtLocation(services, node.callee); + + if (prevType.isUnion()) { + const isOwnNullable = prevType.types.some(type => { + const signatures = type.getCallSignatures(); + return signatures.some(sig => + isNullableType(sig.getReturnType(), { allowUndefined: true }), + ); + }); + return ( + !isOwnNullable && isNullableType(prevType, { allowUndefined: true }) + ); + } + + return false; + } + function isOptionableExpression(node: TSESTree.Expression): boolean { const type = getConstrainedTypeAtLocation(services, node); const isOwnNullable = node.type === AST_NODE_TYPES.MemberExpression - ? !isNullableOriginFromPrev(node) - : true; + ? !isMemberExpressionNullableOriginFromObject(node) + : node.type === AST_NODE_TYPES.CallExpression + ? !isCallExpressionNullableOriginFromCallee(node) + : true; + const possiblyVoid = isTypeFlagSet(type, ts.TypeFlags.Void); return ( isTypeFlagSet(type, ts.TypeFlags.Any | ts.TypeFlags.Unknown) || diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts index a3f26300b2c3..7c31bf419578 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts @@ -772,6 +772,28 @@ function getElem(dict: Record, key: string) { typescript: '4.1', }, }, + ` +type Foo = { bar: () => number | undefined } | null; +declare const foo: Foo; +foo?.bar()?.toExponential(); + `, + ` +type Foo = (() => number | undefined) | null; +declare const foo: Foo; +foo?.()?.toExponential(); + `, + ` +type FooUndef = () => undefined; +type FooNum = () => number; +type Foo = FooUndef | FooNum | null; +declare const foo: Foo; +foo?.()?.toExponential(); + `, + ` +type Foo = { [key: string]: () => number | undefined } | null; +declare const foo: Foo; +foo?.['bar']()?.toExponential(); + `, ], invalid: [ // Ensure that it's checking in all the right places @@ -1991,6 +2013,118 @@ foo &&= null; }, ], }, + { + code: noFormat` +type Foo = { bar: () => number } | null; +declare const foo: Foo; +foo?.bar()?.toExponential(); + `, + output: noFormat` +type Foo = { bar: () => number } | null; +declare const foo: Foo; +foo?.bar().toExponential(); + `, + errors: [ + { + messageId: 'neverOptionalChain', + line: 4, + column: 11, + endLine: 4, + endColumn: 13, + }, + ], + }, + { + code: noFormat` +type Foo = { bar: null | { baz: () => { qux: number } } } | null; +declare const foo: Foo; +foo?.bar?.baz()?.qux?.toExponential(); + `, + output: noFormat` +type Foo = { bar: null | { baz: () => { qux: number } } } | null; +declare const foo: Foo; +foo?.bar?.baz().qux.toExponential(); + `, + errors: [ + { + messageId: 'neverOptionalChain', + line: 4, + column: 16, + endLine: 4, + endColumn: 18, + }, + { + messageId: 'neverOptionalChain', + line: 4, + column: 21, + endLine: 4, + endColumn: 23, + }, + ], + }, + { + code: noFormat` +type Foo = (() => number) | null; +declare const foo: Foo; +foo?.()?.toExponential(); + `, + output: noFormat` +type Foo = (() => number) | null; +declare const foo: Foo; +foo?.().toExponential(); + `, + errors: [ + { + messageId: 'neverOptionalChain', + line: 4, + column: 8, + endLine: 4, + endColumn: 10, + }, + ], + }, + { + code: noFormat` +type Foo = { [key: string]: () => number } | null; +declare const foo: Foo; +foo?.['bar']()?.toExponential(); + `, + output: noFormat` +type Foo = { [key: string]: () => number } | null; +declare const foo: Foo; +foo?.['bar']().toExponential(); + `, + errors: [ + { + messageId: 'neverOptionalChain', + line: 4, + column: 15, + endLine: 4, + endColumn: 17, + }, + ], + }, + { + code: noFormat` +type Foo = { [key: string]: () => number } | null; +declare const foo: Foo; +foo?.['bar']?.()?.toExponential(); + `, + output: noFormat` +type Foo = { [key: string]: () => number } | null; +declare const foo: Foo; +foo?.['bar']?.().toExponential(); + `, + errors: [ + { + messageId: 'neverOptionalChain', + line: 4, + column: 17, + endLine: 4, + endColumn: 19, + }, + ], + }, // "branded" types unnecessaryConditionTest('"" & {}', 'alwaysFalsy'), From 2ba8c00aa2203130222cccf2a085af17172fe340 Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Mon, 8 Jan 2024 19:43:51 +0300 Subject: [PATCH 051/165] fix(eslint-plugin): [prefer-readonly] support modifiers of unions and intersections (#8169) --- .../src/rules/prefer-readonly.ts | 79 +++++++-- .../tests/rules/prefer-readonly.test.ts | 159 ++++++++++++++++++ 2 files changed, 225 insertions(+), 13 deletions(-) diff --git a/packages/eslint-plugin/src/rules/prefer-readonly.ts b/packages/eslint-plugin/src/rules/prefer-readonly.ts index be92e541781c..ea4ff0e1bc4c 100644 --- a/packages/eslint-plugin/src/rules/prefer-readonly.ts +++ b/packages/eslint-plugin/src/rules/prefer-readonly.ts @@ -251,6 +251,13 @@ type ParameterOrPropertyDeclaration = const OUTSIDE_CONSTRUCTOR = -1; const DIRECTLY_INSIDE_CONSTRUCTOR = 0; +enum TypeToClassRelation { + ClassAndInstance, + Class, + Instance, + None, +} + class ClassScope { private readonly privateModifiableMembers = new Map< string, @@ -312,29 +319,75 @@ class ClassScope { ).set(node.name.getText(), node); } + public getTypeToClassRelation(type: ts.Type): TypeToClassRelation { + if (type.isIntersection()) { + let result: TypeToClassRelation = TypeToClassRelation.None; + for (const subType of type.types) { + const subTypeResult = this.getTypeToClassRelation(subType); + switch (subTypeResult) { + case TypeToClassRelation.Class: + if (result === TypeToClassRelation.Instance) { + return TypeToClassRelation.ClassAndInstance; + } + result = TypeToClassRelation.Class; + break; + case TypeToClassRelation.Instance: + if (result === TypeToClassRelation.Class) { + return TypeToClassRelation.ClassAndInstance; + } + result = TypeToClassRelation.Instance; + break; + } + } + return result; + } + if (type.isUnion()) { + // any union of class/instance and something else will prevent access to + // private members, so we assume that union consists only of classes + // or class instances, because otherwise tsc will report an error + return this.getTypeToClassRelation(type.types[0]); + } + + if (!type.getSymbol() || !typeIsOrHasBaseType(type, this.classType)) { + return TypeToClassRelation.None; + } + + const typeIsClass = + tsutils.isObjectType(type) && + tsutils.isObjectFlagSet(type, ts.ObjectFlags.Anonymous); + + if (typeIsClass) { + return TypeToClassRelation.Class; + } + + return TypeToClassRelation.Instance; + } + public addVariableModification(node: ts.PropertyAccessExpression): void { const modifierType = this.checker.getTypeAtLocation(node.expression); + + const relationOfModifierTypeToClass = + this.getTypeToClassRelation(modifierType); + if ( - !modifierType.getSymbol() || - !typeIsOrHasBaseType(modifierType, this.classType) + relationOfModifierTypeToClass === TypeToClassRelation.Instance && + this.constructorScopeDepth === DIRECTLY_INSIDE_CONSTRUCTOR ) { return; } - const modifyingStatic = - tsutils.isObjectType(modifierType) && - tsutils.isObjectFlagSet(modifierType, ts.ObjectFlags.Anonymous); if ( - !modifyingStatic && - this.constructorScopeDepth === DIRECTLY_INSIDE_CONSTRUCTOR + relationOfModifierTypeToClass === TypeToClassRelation.Instance || + relationOfModifierTypeToClass === TypeToClassRelation.ClassAndInstance ) { - return; + this.memberVariableModifications.add(node.name.text); + } + if ( + relationOfModifierTypeToClass === TypeToClassRelation.Class || + relationOfModifierTypeToClass === TypeToClassRelation.ClassAndInstance + ) { + this.staticVariableModifications.add(node.name.text); } - - (modifyingStatic - ? this.staticVariableModifications - : this.memberVariableModifications - ).add(node.name.text); } public enterConstructor( diff --git a/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts b/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts index d35ffa66edb6..a8d170c4a7d0 100644 --- a/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts @@ -651,6 +651,72 @@ class Foo { } `, }, + ` + class TestIntersection { + private prop: number = 3; + + test() { + const that = {} as this & { _foo: 'bar' }; + that.prop = 1; + } + } + `, + ` + class TestUnion { + private prop: number = 3; + + test() { + const that = {} as this | (this & { _foo: 'bar' }); + that.prop = 1; + } + } + `, + ` + class TestStaticIntersection { + private static prop: number; + + test() { + const that = {} as typeof TestStaticIntersection & { _foo: 'bar' }; + that.prop = 1; + } + } + `, + ` + class TestStaticUnion { + private static prop: number = 1; + + test() { + const that = {} as + | typeof TestStaticUnion + | (typeof TestStaticUnion & { _foo: 'bar' }); + that.prop = 1; + } + } + `, + ` + class TestBothIntersection { + private prop1: number = 1; + private static prop2: number; + + test() { + const that = {} as typeof TestBothIntersection & this; + that.prop1 = 1; + that.prop2 = 1; + } + } + `, + ` + class TestBothIntersection { + private prop1: number = 1; + private static prop2: number; + + test() { + const that = {} as this & typeof TestBothIntersection; + that.prop1 = 1; + that.prop2 = 1; + } + } + `, ], invalid: [ { @@ -1978,5 +2044,98 @@ function ClassWithName {}>(Base: TBase) { }, ], }, + { + code: ` + class Test { + private prop: number = 3; + + test() { + const that = {} as this & { _foo: 'bar' }; + that._foo = 1; + } + } + `, + output: ` + class Test { + private readonly prop: number = 3 + + test() { + const that = {} as this & {_foo: 'bar'} + that._foo = 1 + } + } + `, + errors: [ + { + data: { + name: 'prop', + }, + line: 3, + messageId: 'preferReadonly', + }, + ], + }, + { + code: ` + class Test { + private prop: number = 3; + + test() { + const that = {} as this | (this & { _foo: 'bar' }); + that.prop; + } + } + `, + output: ` + class Test { + private readonly prop: number = 3 + + test() { + const that = {} as this | (this & {_foo: 'bar'}) + that.prop + } + } + `, + errors: [ + { + data: { + name: 'prop', + }, + line: 3, + messageId: 'preferReadonly', + }, + ], + }, + { + code: ` + class Test { + private prop: number; + + constructor() { + const that = {} as this & { _foo: 'bar' }; + that.prop = 1; + } + } + `, + output: ` + class Test { + private readonly prop: number + + constructor() { + const that = {} as this & {_foo: 'bar'} + that.prop = 1 + } + } + `, + errors: [ + { + data: { + name: 'prop', + }, + line: 3, + messageId: 'preferReadonly', + }, + ], + }, ], }); From 24390d7415e7fb1b9e679fbeb4aa50b0a52cb76a Mon Sep 17 00:00:00 2001 From: James <5511220+Zamiell@users.noreply.github.com> Date: Mon, 8 Jan 2024 11:44:15 -0500 Subject: [PATCH 052/165] fix(eslint-plugin): [switch-exhaustiveness-check] fix new allowDefaultCaseForExhaustiveSwitch option (#8176) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(allowDefaultCaseForExhaustiveSwitch): rule * chore: format * fix: add containsNonLiteralType * chore: cleanup * refactor: use type flags instead of strings * Update packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts * Update packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts --------- Co-authored-by: Josh Goldberg ✨ --- .../src/rules/switch-exhaustiveness-check.ts | 41 ++- .../rules/switch-exhaustiveness-check.test.ts | 285 ++++++++++++++++++ 2 files changed, 323 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts index 64ab5ef6b2e2..c6ed86463ca0 100644 --- a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts +++ b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts @@ -17,12 +17,14 @@ interface SwitchMetadata { readonly missingBranchTypes: ts.Type[]; readonly defaultCase: TSESTree.SwitchCase | undefined; readonly isUnion: boolean; + readonly containsNonLiteralType: boolean; } type Options = [ { /** - * If `true`, allow `default` cases on switch statements with exhaustive cases. + * If `true`, allow `default` cases on switch statements with exhaustive + * cases. * * @default true */ @@ -104,12 +106,16 @@ export default createRule({ | string | undefined; + const containsNonLiteralType = + doesTypeContainNonLiteralType(discriminantType); + if (!discriminantType.isUnion()) { return { symbolName, missingBranchTypes: [], defaultCase, isUnion: false, + containsNonLiteralType, }; } @@ -138,9 +144,29 @@ export default createRule({ missingBranchTypes, defaultCase, isUnion: true, + containsNonLiteralType, }; } + /** + * For example: + * + * - `"foo" | "bar"` is a type with all literal types. + * - `"foo" | number` is a type that contains non-literal types. + * + * Default cases are never superfluous in switches with non-literal types. + */ + function doesTypeContainNonLiteralType(type: ts.Type): boolean { + const types = tsutils.unionTypeParts(type); + return types.some( + type => + !isFlagSet( + type.getFlags(), + ts.TypeFlags.Literal | ts.TypeFlags.Undefined | ts.TypeFlags.Null, + ), + ); + } + function checkSwitchExhaustive( node: TSESTree.SwitchStatement, switchMetadata: SwitchMetadata, @@ -272,9 +298,14 @@ export default createRule({ return; } - const { missingBranchTypes, defaultCase } = switchMetadata; + const { missingBranchTypes, defaultCase, containsNonLiteralType } = + switchMetadata; - if (missingBranchTypes.length === 0 && defaultCase !== undefined) { + if ( + missingBranchTypes.length === 0 && + defaultCase !== undefined && + !containsNonLiteralType + ) { context.report({ node: defaultCase, messageId: 'dangerousDefaultCase', @@ -322,3 +353,7 @@ export default createRule({ }; }, }); + +function isFlagSet(flags: number, flag: number): boolean { + return (flags & flag) !== 0; +} diff --git a/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts b/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts index 9a06ace1e0a9..5d58d0576052 100644 --- a/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts +++ b/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts @@ -229,6 +229,110 @@ switch (value) { }, ], }, + // switch with default clause on string type + + // "allowDefaultCaseForExhaustiveSwitch" option + { + code: ` +declare const value: string; +switch (value) { + case 'foo': + return 0; + case 'bar': + return 1; + default: + return -1; +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + }, + // switch with default clause on number type + + // "allowDefaultCaseForExhaustiveSwitch" option + { + code: ` +declare const value: number; +switch (value) { + case 0: + return 0; + case 1: + return 1; + default: + return -1; +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + }, + // switch with default clause on bigint type + + // "allowDefaultCaseForExhaustiveSwitch" option + { + code: ` +declare const value: bigint; +switch (value) { + case 0: + return 0; + case 1: + return 1; + default: + return -1; +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + }, + // switch with default clause on symbol type + + // "allowDefaultCaseForExhaustiveSwitch" option + { + code: ` +declare const value: symbol; +const foo = Symbol('foo'); +switch (value) { + case foo: + return 0; + default: + return -1; +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + }, + // switch with default clause on union with number + + // "allowDefaultCaseForExhaustiveSwitch" option + { + code: ` +declare const value: 0 | 1 | number; +switch (value) { + case 0: + return 0; + case 1: + return 1; + default: + return -1; +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + }, ], invalid: [ { @@ -735,6 +839,7 @@ switch (value) { ], }, { + // superfluous switch with a string-based union code: ` type MyUnion = 'foo' | 'bar' | 'baz'; @@ -746,6 +851,186 @@ switch (myUnion) { case 'baz': { break; } + default: { + break; + } +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + errors: [ + { + messageId: 'dangerousDefaultCase', + }, + ], + }, + { + // superfluous switch with a string-based enum + code: ` +enum MyEnum { + Foo = 'Foo', + Bar = 'Bar', + Baz = 'Baz', +} + +declare const myEnum: MyEnum; + +switch (myEnum) { + case MyEnum.Foo: + case MyEnum.Bar: + case MyEnum.Baz: { + break; + } + default: { + break; + } +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + errors: [ + { + messageId: 'dangerousDefaultCase', + }, + ], + }, + { + // superfluous switch with a number-based enum + code: ` +enum MyEnum { + Foo, + Bar, + Baz, +} + +declare const myEnum: MyEnum; + +switch (myEnum) { + case MyEnum.Foo: + case MyEnum.Bar: + case MyEnum.Baz: { + break; + } + default: { + break; + } +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + errors: [ + { + messageId: 'dangerousDefaultCase', + }, + ], + }, + { + // superfluous switch with a boolean + code: ` +declare const myBoolean: boolean; + +switch (myBoolean) { + case true: + case false: { + break; + } + default: { + break; + } +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + errors: [ + { + messageId: 'dangerousDefaultCase', + }, + ], + }, + { + // superfluous switch with undefined + code: ` +declare const myValue: undefined; + +switch (myValue) { + case undefined: { + break; + } + + default: { + break; + } +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + errors: [ + { + messageId: 'dangerousDefaultCase', + }, + ], + }, + { + // superfluous switch with null + code: ` +declare const myValue: null; + +switch (myValue) { + case null: { + break; + } + + default: { + break; + } +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + errors: [ + { + messageId: 'dangerousDefaultCase', + }, + ], + }, + { + // superfluous switch with union of various types + code: ` +declare const myValue: 'foo' | boolean | undefined | null; + +switch (myValue) { + case 'foo': + case true: + case false: + case undefined: + case null: { + break; + } + default: { break; } From 095b3a66b014f419324a06606fa0d73e9ff8942a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 12:43:36 -0500 Subject: [PATCH 053/165] chore(deps): update dependency tsx to v4.7.0 (#8162) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 461 ++++++++++++------------------------------------------ 1 file changed, 102 insertions(+), 359 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1daeeb30cba8..4a9a608c4945 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2908,317 +2908,163 @@ __metadata: languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/aix-ppc64@npm:0.19.10" +"@esbuild/aix-ppc64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/aix-ppc64@npm:0.19.11" conditions: os=aix & cpu=ppc64 languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/android-arm64@npm:0.18.20" +"@esbuild/android-arm64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/android-arm64@npm:0.19.11" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/android-arm64@npm:0.19.10" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/android-arm@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/android-arm@npm:0.18.20" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@esbuild/android-arm@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/android-arm@npm:0.19.10" +"@esbuild/android-arm@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/android-arm@npm:0.19.11" conditions: os=android & cpu=arm languageName: node linkType: hard -"@esbuild/android-x64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/android-x64@npm:0.18.20" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/android-x64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/android-x64@npm:0.19.10" +"@esbuild/android-x64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/android-x64@npm:0.19.11" conditions: os=android & cpu=x64 languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/darwin-arm64@npm:0.18.20" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/darwin-arm64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/darwin-arm64@npm:0.19.10" +"@esbuild/darwin-arm64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/darwin-arm64@npm:0.19.11" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/darwin-x64@npm:0.18.20" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/darwin-x64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/darwin-x64@npm:0.19.10" +"@esbuild/darwin-x64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/darwin-x64@npm:0.19.11" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/freebsd-arm64@npm:0.18.20" +"@esbuild/freebsd-arm64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/freebsd-arm64@npm:0.19.11" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/freebsd-arm64@npm:0.19.10" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/freebsd-x64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/freebsd-x64@npm:0.18.20" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/freebsd-x64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/freebsd-x64@npm:0.19.10" +"@esbuild/freebsd-x64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/freebsd-x64@npm:0.19.11" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/linux-arm64@npm:0.18.20" +"@esbuild/linux-arm64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/linux-arm64@npm:0.19.11" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/linux-arm64@npm:0.19.10" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/linux-arm@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/linux-arm@npm:0.18.20" +"@esbuild/linux-arm@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/linux-arm@npm:0.19.11" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/linux-arm@npm:0.19.10" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@esbuild/linux-ia32@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/linux-ia32@npm:0.18.20" +"@esbuild/linux-ia32@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/linux-ia32@npm:0.19.11" conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/linux-ia32@npm:0.19.10" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/linux-loong64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/linux-loong64@npm:0.18.20" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - -"@esbuild/linux-loong64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/linux-loong64@npm:0.19.10" +"@esbuild/linux-loong64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/linux-loong64@npm:0.19.11" conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/linux-mips64el@npm:0.18.20" +"@esbuild/linux-mips64el@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/linux-mips64el@npm:0.19.11" conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/linux-mips64el@npm:0.19.10" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"@esbuild/linux-ppc64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/linux-ppc64@npm:0.18.20" +"@esbuild/linux-ppc64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/linux-ppc64@npm:0.19.11" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/linux-ppc64@npm:0.19.10" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/linux-riscv64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/linux-riscv64@npm:0.18.20" +"@esbuild/linux-riscv64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/linux-riscv64@npm:0.19.11" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/linux-riscv64@npm:0.19.10" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"@esbuild/linux-s390x@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/linux-s390x@npm:0.18.20" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"@esbuild/linux-s390x@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/linux-s390x@npm:0.19.10" +"@esbuild/linux-s390x@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/linux-s390x@npm:0.19.11" conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/linux-x64@npm:0.18.20" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/linux-x64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/linux-x64@npm:0.19.10" +"@esbuild/linux-x64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/linux-x64@npm:0.19.11" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/netbsd-x64@npm:0.18.20" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/netbsd-x64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/netbsd-x64@npm:0.19.10" +"@esbuild/netbsd-x64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/netbsd-x64@npm:0.19.11" conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/openbsd-x64@npm:0.18.20" +"@esbuild/openbsd-x64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/openbsd-x64@npm:0.19.11" conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/openbsd-x64@npm:0.19.10" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/sunos-x64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/sunos-x64@npm:0.18.20" +"@esbuild/sunos-x64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/sunos-x64@npm:0.19.11" conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/sunos-x64@npm:0.19.10" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/win32-arm64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/win32-arm64@npm:0.18.20" +"@esbuild/win32-arm64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/win32-arm64@npm:0.19.11" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/win32-arm64@npm:0.19.10" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/win32-ia32@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/win32-ia32@npm:0.18.20" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/win32-ia32@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/win32-ia32@npm:0.19.10" +"@esbuild/win32-ia32@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/win32-ia32@npm:0.19.11" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.18.20": - version: 0.18.20 - resolution: "@esbuild/win32-x64@npm:0.18.20" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/win32-x64@npm:0.19.10": - version: 0.19.10 - resolution: "@esbuild/win32-x64@npm:0.19.10" +"@esbuild/win32-x64@npm:0.19.11": + version: 0.19.11 + resolution: "@esbuild/win32-x64@npm:0.19.11" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3838,15 +3684,6 @@ __metadata: languageName: node linkType: hard -"@nrwl/devkit@npm:17.1.2": - version: 17.1.2 - resolution: "@nrwl/devkit@npm:17.1.2" - dependencies: - "@nx/devkit": 17.1.2 - checksum: ae67ed81a0f718ffeab250ee748b42605b8a44d1524d56c7196fcc2a36ea692802a340d8f4b23cc00d4e5312eab2757715bbbaa05ec09ee8f79171d7a55fdf95 - languageName: node - linkType: hard - "@nrwl/devkit@npm:17.2.8": version: 17.2.8 resolution: "@nrwl/devkit@npm:17.2.8" @@ -3895,24 +3732,7 @@ __metadata: languageName: node linkType: hard -"@nx/devkit@npm:*, @nx/devkit@npm:17.1.2": - version: 17.1.2 - resolution: "@nx/devkit@npm:17.1.2" - dependencies: - "@nrwl/devkit": 17.1.2 - ejs: ^3.1.7 - enquirer: ~2.3.6 - ignore: ^5.0.4 - semver: 7.5.3 - tmp: ~0.2.1 - tslib: ^2.3.0 - peerDependencies: - nx: ">= 16 <= 18" - checksum: 6cd436aca770061bcbaf963100d99a7acee5bfeccfafcdeb9670e6c467450b6715f2feec57130ca13853ca3b2eb0e53ec94374fcd6976ba14111c1e9aede937f - languageName: node - linkType: hard - -"@nx/devkit@npm:17.2.8": +"@nx/devkit@npm:*, @nx/devkit@npm:17.2.8": version: 17.2.8 resolution: "@nx/devkit@npm:17.2.8" dependencies: @@ -9142,110 +8962,33 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:~0.18.20": - version: 0.18.20 - resolution: "esbuild@npm:0.18.20" - dependencies: - "@esbuild/android-arm": 0.18.20 - "@esbuild/android-arm64": 0.18.20 - "@esbuild/android-x64": 0.18.20 - "@esbuild/darwin-arm64": 0.18.20 - "@esbuild/darwin-x64": 0.18.20 - "@esbuild/freebsd-arm64": 0.18.20 - "@esbuild/freebsd-x64": 0.18.20 - "@esbuild/linux-arm": 0.18.20 - "@esbuild/linux-arm64": 0.18.20 - "@esbuild/linux-ia32": 0.18.20 - "@esbuild/linux-loong64": 0.18.20 - "@esbuild/linux-mips64el": 0.18.20 - "@esbuild/linux-ppc64": 0.18.20 - "@esbuild/linux-riscv64": 0.18.20 - "@esbuild/linux-s390x": 0.18.20 - "@esbuild/linux-x64": 0.18.20 - "@esbuild/netbsd-x64": 0.18.20 - "@esbuild/openbsd-x64": 0.18.20 - "@esbuild/sunos-x64": 0.18.20 - "@esbuild/win32-arm64": 0.18.20 - "@esbuild/win32-ia32": 0.18.20 - "@esbuild/win32-x64": 0.18.20 - dependenciesMeta: - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 5d253614e50cdb6ec22095afd0c414f15688e7278a7eb4f3720a6dd1306b0909cf431e7b9437a90d065a31b1c57be60130f63fe3e8d0083b588571f31ee6ec7b - languageName: node - linkType: hard - -"esbuild@npm:~0.19.0": - version: 0.19.10 - resolution: "esbuild@npm:0.19.10" - dependencies: - "@esbuild/aix-ppc64": 0.19.10 - "@esbuild/android-arm": 0.19.10 - "@esbuild/android-arm64": 0.19.10 - "@esbuild/android-x64": 0.19.10 - "@esbuild/darwin-arm64": 0.19.10 - "@esbuild/darwin-x64": 0.19.10 - "@esbuild/freebsd-arm64": 0.19.10 - "@esbuild/freebsd-x64": 0.19.10 - "@esbuild/linux-arm": 0.19.10 - "@esbuild/linux-arm64": 0.19.10 - "@esbuild/linux-ia32": 0.19.10 - "@esbuild/linux-loong64": 0.19.10 - "@esbuild/linux-mips64el": 0.19.10 - "@esbuild/linux-ppc64": 0.19.10 - "@esbuild/linux-riscv64": 0.19.10 - "@esbuild/linux-s390x": 0.19.10 - "@esbuild/linux-x64": 0.19.10 - "@esbuild/netbsd-x64": 0.19.10 - "@esbuild/openbsd-x64": 0.19.10 - "@esbuild/sunos-x64": 0.19.10 - "@esbuild/win32-arm64": 0.19.10 - "@esbuild/win32-ia32": 0.19.10 - "@esbuild/win32-x64": 0.19.10 +"esbuild@npm:~0.19.0, esbuild@npm:~0.19.10": + version: 0.19.11 + resolution: "esbuild@npm:0.19.11" + dependencies: + "@esbuild/aix-ppc64": 0.19.11 + "@esbuild/android-arm": 0.19.11 + "@esbuild/android-arm64": 0.19.11 + "@esbuild/android-x64": 0.19.11 + "@esbuild/darwin-arm64": 0.19.11 + "@esbuild/darwin-x64": 0.19.11 + "@esbuild/freebsd-arm64": 0.19.11 + "@esbuild/freebsd-x64": 0.19.11 + "@esbuild/linux-arm": 0.19.11 + "@esbuild/linux-arm64": 0.19.11 + "@esbuild/linux-ia32": 0.19.11 + "@esbuild/linux-loong64": 0.19.11 + "@esbuild/linux-mips64el": 0.19.11 + "@esbuild/linux-ppc64": 0.19.11 + "@esbuild/linux-riscv64": 0.19.11 + "@esbuild/linux-s390x": 0.19.11 + "@esbuild/linux-x64": 0.19.11 + "@esbuild/netbsd-x64": 0.19.11 + "@esbuild/openbsd-x64": 0.19.11 + "@esbuild/sunos-x64": 0.19.11 + "@esbuild/win32-arm64": 0.19.11 + "@esbuild/win32-ia32": 0.19.11 + "@esbuild/win32-x64": 0.19.11 dependenciesMeta: "@esbuild/aix-ppc64": optional: true @@ -9295,7 +9038,7 @@ __metadata: optional: true bin: esbuild: bin/esbuild - checksum: b97f2f837c931e065839fe9adebba44b80aaa81c6b32dca4e1e77c068a0afb045d08a94d86abdacb29daef783ec092f0db688a31f3d463e2e42ac17e5a478265 + checksum: ae949a796d1d06b55275ae7491ce137857468f69a93d8cc9c0943d2a701ac54e14dbb250a2ba56f2ad98283669578f1ec3bd85a4681910a5ff29a2470c3bd62c languageName: node linkType: hard @@ -18191,10 +17934,10 @@ __metadata: linkType: hard "tsx@npm:^4.6.2": - version: 4.6.2 - resolution: "tsx@npm:4.6.2" + version: 4.7.0 + resolution: "tsx@npm:4.7.0" dependencies: - esbuild: ~0.18.20 + esbuild: ~0.19.10 fsevents: ~2.3.3 get-tsconfig: ^4.7.2 dependenciesMeta: @@ -18202,7 +17945,7 @@ __metadata: optional: true bin: tsx: dist/cli.mjs - checksum: a9f13bdb67bfb316bbfc92303d8464323ab1b673aa93ea97271c211a8ba7c59274d4b32eeec5ad8fbd0b04260a092a3ad2116abeb6913254ba456010ff685743 + checksum: a3a17fa8a40dbe0aff26fb2bc71a069e568152e0685b0bd9a31ea1091806274ba14882551433ed01efa7eae16f1aa965e2e47f3075ec1e914c42cf5dfce1f924 languageName: node linkType: hard From a4ffa49974beb200947c0b9a81ebcfc171640f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Mon, 8 Jan 2024 13:25:00 -0500 Subject: [PATCH 054/165] chore: fix yargs call in release script (#8221) --- package.json | 1 + tools/release/release.mts | 2 +- yarn.lock | 9 +++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2e5620ee1d0c..f43185c96c6c 100644 --- a/package.json +++ b/package.json @@ -78,6 +78,7 @@ "@types/node": "^20.0.0", "@types/semver": "^7.5.0", "@types/tmp": "^0.2.3", + "@types/yargs": "^17.0.32", "console-fail-test": "^0.2.3", "cross-fetch": "^4.0.0", "cspell": "^7.0.0", diff --git a/tools/release/release.mts b/tools/release/release.mts index d8306324325c..db4c0aa4cdc5 100644 --- a/tools/release/release.mts +++ b/tools/release/release.mts @@ -6,7 +6,7 @@ import { } from 'nx/src/command-line/release'; import yargs from 'yargs'; -const options = await yargs +const options = await yargs(process.argv.slice(2)) .version(false) .option('version', { description: diff --git a/yarn.lock b/yarn.lock index 4a9a608c4945..e16b4e030b41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5185,12 +5185,12 @@ __metadata: languageName: node linkType: hard -"@types/yargs@npm:^17.0.8": - version: 17.0.24 - resolution: "@types/yargs@npm:17.0.24" +"@types/yargs@npm:^17.0.32, @types/yargs@npm:^17.0.8": + version: 17.0.32 + resolution: "@types/yargs@npm:17.0.32" dependencies: "@types/yargs-parser": "*" - checksum: 5f3ac4dc4f6e211c1627340160fbe2fd247ceba002190da6cf9155af1798450501d628c9165a183f30a224fc68fa5e700490d740ff4c73e2cdef95bc4e8ba7bf + checksum: 4505bdebe8716ff383640c6e928f855b5d337cb3c68c81f7249fc6b983d0aa48de3eee26062b84f37e0d75a5797bc745e0c6e76f42f81771252a758c638f36ba languageName: node linkType: hard @@ -5472,6 +5472,7 @@ __metadata: "@types/node": ^20.0.0 "@types/semver": ^7.5.0 "@types/tmp": ^0.2.3 + "@types/yargs": ^17.0.32 console-fail-test: ^0.2.3 cross-fetch: ^4.0.0 cspell: ^7.0.0 From e798241e87c89304886d41f669a59b2f744244e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Mon, 8 Jan 2024 13:46:03 -0500 Subject: [PATCH 055/165] chore: fix test formatting in prefer-readonly.test.ts (#8223) --- .../tests/rules/prefer-readonly.test.ts | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts b/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts index a8d170c4a7d0..39262c6fbb4e 100644 --- a/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts @@ -654,7 +654,7 @@ class Foo { ` class TestIntersection { private prop: number = 3; - + test() { const that = {} as this & { _foo: 'bar' }; that.prop = 1; @@ -664,7 +664,7 @@ class Foo { ` class TestUnion { private prop: number = 3; - + test() { const that = {} as this | (this & { _foo: 'bar' }); that.prop = 1; @@ -674,7 +674,7 @@ class Foo { ` class TestStaticIntersection { private static prop: number; - + test() { const that = {} as typeof TestStaticIntersection & { _foo: 'bar' }; that.prop = 1; @@ -684,7 +684,7 @@ class Foo { ` class TestStaticUnion { private static prop: number = 1; - + test() { const that = {} as | typeof TestStaticUnion @@ -697,7 +697,7 @@ class Foo { class TestBothIntersection { private prop1: number = 1; private static prop2: number; - + test() { const that = {} as typeof TestBothIntersection & this; that.prop1 = 1; @@ -709,7 +709,7 @@ class Foo { class TestBothIntersection { private prop1: number = 1; private static prop2: number; - + test() { const that = {} as this & typeof TestBothIntersection; that.prop1 = 1; @@ -2048,7 +2048,7 @@ function ClassWithName {}>(Base: TBase) { code: ` class Test { private prop: number = 3; - + test() { const that = {} as this & { _foo: 'bar' }; that._foo = 1; @@ -2057,11 +2057,11 @@ function ClassWithName {}>(Base: TBase) { `, output: ` class Test { - private readonly prop: number = 3 + private readonly prop: number = 3; test() { - const that = {} as this & {_foo: 'bar'} - that._foo = 1 + const that = {} as this & { _foo: 'bar' }; + that._foo = 1; } } `, @@ -2079,7 +2079,7 @@ function ClassWithName {}>(Base: TBase) { code: ` class Test { private prop: number = 3; - + test() { const that = {} as this | (this & { _foo: 'bar' }); that.prop; @@ -2088,11 +2088,11 @@ function ClassWithName {}>(Base: TBase) { `, output: ` class Test { - private readonly prop: number = 3 + private readonly prop: number = 3; test() { - const that = {} as this | (this & {_foo: 'bar'}) - that.prop + const that = {} as this | (this & { _foo: 'bar' }); + that.prop; } } `, @@ -2110,7 +2110,7 @@ function ClassWithName {}>(Base: TBase) { code: ` class Test { private prop: number; - + constructor() { const that = {} as this & { _foo: 'bar' }; that.prop = 1; @@ -2119,11 +2119,11 @@ function ClassWithName {}>(Base: TBase) { `, output: ` class Test { - private readonly prop: number + private readonly prop: number; constructor() { - const that = {} as this & {_foo: 'bar'} - that.prop = 1 + const that = {} as this & { _foo: 'bar' }; + that.prop = 1; } } `, From c0384261b20678a6a476b4f19c1f852fe8167df9 Mon Sep 17 00:00:00 2001 From: "typescript-eslint[bot]" Date: Mon, 8 Jan 2024 22:36:03 +0000 Subject: [PATCH 056/165] chore(release): publish 6.18.1 --- CHANGELOG.md | 22 ++++ packages/ast-spec/CHANGELOG.md | 17 +++ packages/ast-spec/package.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 6 + packages/eslint-plugin-internal/package.json | 10 +- packages/eslint-plugin-tslint/CHANGELOG.md | 6 + packages/eslint-plugin-tslint/package.json | 6 +- packages/eslint-plugin/CHANGELOG.md | 23 ++++ packages/eslint-plugin/package.json | 14 +-- packages/integration-tests/CHANGELOG.md | 6 + packages/integration-tests/package.json | 2 +- packages/parser/CHANGELOG.md | 6 + packages/parser/package.json | 10 +- packages/repo-tools/CHANGELOG.md | 6 + packages/repo-tools/package.json | 2 +- .../CHANGELOG.md | 6 + .../package.json | 6 +- packages/rule-tester/CHANGELOG.md | 6 + packages/rule-tester/package.json | 8 +- packages/scope-manager/CHANGELOG.md | 6 + packages/scope-manager/package.json | 8 +- packages/type-utils/CHANGELOG.md | 6 + packages/type-utils/package.json | 8 +- packages/types/CHANGELOG.md | 6 + packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 19 +++ packages/typescript-estree/package.json | 6 +- packages/utils/CHANGELOG.md | 17 +++ packages/utils/package.json | 10 +- packages/visitor-keys/CHANGELOG.md | 6 + packages/visitor-keys/package.json | 4 +- packages/website-eslint/CHANGELOG.md | 6 + packages/website-eslint/package.json | 16 +-- packages/website/CHANGELOG.md | 6 + packages/website/package.json | 12 +- yarn.lock | 114 +++++++++--------- 36 files changed, 296 insertions(+), 120 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67002ecd4de3..974127de56a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +## 6.18.1 (2024-01-08) + + +### 🩹 Fixes + +- **eslint-plugin:** [no-non-null-assertion] provide valid fix when member access is on next line ([#8185](https://github.com/typescript-eslint/typescript-eslint/pull/8185)) +- **eslint-plugin:** [no-unnecessary-condition] improve checking optional callee ([#8178](https://github.com/typescript-eslint/typescript-eslint/pull/8178)) +- **eslint-plugin:** [prefer-readonly] support modifiers of unions and intersections ([#8169](https://github.com/typescript-eslint/typescript-eslint/pull/8169)) +- **eslint-plugin:** [switch-exhaustiveness-check] fix new allowDefaultCaseForExhaustiveSwitch option ([#8176](https://github.com/typescript-eslint/typescript-eslint/pull/8176)) +- **typescript-estree:** fix invalid parsing error when use update expression on non-null assertion ([#8202](https://github.com/typescript-eslint/typescript-eslint/pull/8202)) +- **typescript-estree:** only create project service from env setting if project is enabled ([#8136](https://github.com/typescript-eslint/typescript-eslint/pull/8136)) +- **utils:** improve error message on typed rule with invalid parser ([#8146](https://github.com/typescript-eslint/typescript-eslint/pull/8146)) + +### ❤️ Thank You + +- auvred @auvred +- James @Zamiell +- Josh Goldberg ✨ +- YeonJuan @yeonjuan + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index f2441beeb101..9608d2aefe36 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -1,3 +1,20 @@ +## 6.18.1 (2024-01-08) + + +### 🩹 Fixes + +- **typescript-estree:** fix invalid parsing error when use update expression on non-null assertion + + +### ❤️ Thank You + +- auvred +- James +- Josh Goldberg ✨ +- YeonJuan + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 36688967c236..3e396707de5f 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "6.18.0", + "version": "6.18.1", "description": "Complete specification for the TypeScript-ESTree AST", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 5da021728824..b49de9be6a19 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 80c9f9f6264d..e0299ce75772 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "6.18.0", + "version": "6.18.1", "private": true, "main": "dist/index.js", "scripts": { @@ -14,10 +14,10 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/rule-tester": "6.18.0", - "@typescript-eslint/scope-manager": "6.18.0", - "@typescript-eslint/type-utils": "6.18.0", - "@typescript-eslint/utils": "6.18.0", + "@typescript-eslint/rule-tester": "6.18.1", + "@typescript-eslint/scope-manager": "6.18.1", + "@typescript-eslint/type-utils": "6.18.1", + "@typescript-eslint/utils": "6.18.1", "prettier": "^3.0.3" }, "devDependencies": { diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 6bf96a3f8ba5..c98f9a8d0e66 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for eslint-plugin-tslint to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for eslint-plugin-tslint to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index edb4451d5548..36ba58ba2895 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "6.18.0", + "version": "6.18.1", "main": "dist/index.js", "typings": "src/index.ts", "description": "ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint", @@ -46,7 +46,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "6.18.0" + "@typescript-eslint/utils": "6.18.1" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0", @@ -55,7 +55,7 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "6.18.0", + "@typescript-eslint/parser": "6.18.1", "jest": "29.7.0", "prettier": "^3.0.3", "rimraf": "*" diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 680613dbebbd..88fb389496c9 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,3 +1,26 @@ +## 6.18.1 (2024-01-08) + + +### 🩹 Fixes + +- **eslint-plugin:** [no-non-null-assertion] provide valid fix when member access is on next line + +- **eslint-plugin:** [no-unnecessary-condition] improve checking optional callee + +- **eslint-plugin:** [prefer-readonly] support modifiers of unions and intersections + +- **eslint-plugin:** [switch-exhaustiveness-check] fix new allowDefaultCaseForExhaustiveSwitch option + + +### ❤️ Thank You + +- auvred +- James +- Josh Goldberg ✨ +- YeonJuan + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 57719bf82f67..07733150bbdf 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "6.18.0", + "version": "6.18.1", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -57,10 +57,10 @@ }, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.18.0", - "@typescript-eslint/type-utils": "6.18.0", - "@typescript-eslint/utils": "6.18.0", - "@typescript-eslint/visitor-keys": "6.18.0", + "@typescript-eslint/scope-manager": "6.18.1", + "@typescript-eslint/type-utils": "6.18.1", + "@typescript-eslint/utils": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -73,8 +73,8 @@ "@types/debug": "*", "@types/marked": "*", "@types/natural-compare": "*", - "@typescript-eslint/rule-schema-to-typescript-types": "6.18.0", - "@typescript-eslint/rule-tester": "6.18.0", + "@typescript-eslint/rule-schema-to-typescript-types": "6.18.1", + "@typescript-eslint/rule-tester": "6.18.1", "ajv": "^6.12.6", "chalk": "^5.3.0", "cross-fetch": "*", diff --git a/packages/integration-tests/CHANGELOG.md b/packages/integration-tests/CHANGELOG.md index eb88a419a9de..01956c239599 100644 --- a/packages/integration-tests/CHANGELOG.md +++ b/packages/integration-tests/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for integration-tests to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for integration-tests to align it with other projects, there were no code changes. diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index bfc59da3d2c2..d917a1b7d0c5 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/integration-tests", - "version": "6.18.0", + "version": "6.18.1", "private": true, "scripts": { "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 3989c7cd8fe6..49608f459c04 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for parser to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for parser to align it with other projects, there were no code changes. diff --git a/packages/parser/package.json b/packages/parser/package.json index deccd5496dc3..48005cd3604d 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "6.18.0", + "version": "6.18.1", "description": "An ESLint custom parser which leverages TypeScript ESTree", "files": [ "dist", @@ -51,10 +51,10 @@ "eslint": "^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "6.18.0", - "@typescript-eslint/types": "6.18.0", - "@typescript-eslint/typescript-estree": "6.18.0", - "@typescript-eslint/visitor-keys": "6.18.0", + "@typescript-eslint/scope-manager": "6.18.1", + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/typescript-estree": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index fc81e9ea8f1e..d8f38af87fd4 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for repo-tools to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for repo-tools to align it with other projects, there were no code changes. diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index e9bea93a7836..593a072fbb2c 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/repo-tools", - "version": "6.18.0", + "version": "6.18.1", "private": true, "scripts": { "//": "NOTE: intentionally no build step in this package", diff --git a/packages/rule-schema-to-typescript-types/CHANGELOG.md b/packages/rule-schema-to-typescript-types/CHANGELOG.md index 8debaf2d90f1..7c442df6eefd 100644 --- a/packages/rule-schema-to-typescript-types/CHANGELOG.md +++ b/packages/rule-schema-to-typescript-types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index cb5c8b549de1..bf42b1752a85 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-schema-to-typescript-types", - "version": "6.18.0", + "version": "6.18.1", "private": true, "type": "commonjs", "exports": { @@ -34,8 +34,8 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/type-utils": "6.18.0", - "@typescript-eslint/utils": "6.18.0", + "@typescript-eslint/type-utils": "6.18.1", + "@typescript-eslint/utils": "6.18.1", "natural-compare": "^1.4.0", "prettier": "^3.0.3" }, diff --git a/packages/rule-tester/CHANGELOG.md b/packages/rule-tester/CHANGELOG.md index 53780d4d10a9..83ba6ce3089e 100644 --- a/packages/rule-tester/CHANGELOG.md +++ b/packages/rule-tester/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for rule-tester to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for rule-tester to align it with other projects, there were no code changes. diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index a314297e3285..f9f2ba2ffdb3 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-tester", - "version": "6.18.0", + "version": "6.18.1", "description": "Tooling to test ESLint rules", "files": [ "dist", @@ -47,8 +47,8 @@ }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { - "@typescript-eslint/typescript-estree": "6.18.0", - "@typescript-eslint/utils": "6.18.0", + "@typescript-eslint/typescript-estree": "6.18.1", + "@typescript-eslint/utils": "6.18.1", "ajv": "^6.10.0", "lodash.merge": "4.6.2", "semver": "^7.5.4" @@ -59,7 +59,7 @@ }, "devDependencies": { "@types/lodash.merge": "4.6.9", - "@typescript-eslint/parser": "6.18.0", + "@typescript-eslint/parser": "6.18.1", "chai": "^4.3.7", "mocha": "^10.0.0", "sinon": "^16.0.0", diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index af9157777d0b..894664c687c0 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for scope-manager to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for scope-manager to align it with other projects, there were no code changes. diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index dc6262ced80b..edd3869831f6 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "6.18.0", + "version": "6.18.1", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -44,13 +44,13 @@ "typecheck": "npx nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "6.18.0", - "@typescript-eslint/visitor-keys": "6.18.0" + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1" }, "devDependencies": { "@prettier/sync": "*", "@types/glob": "*", - "@typescript-eslint/typescript-estree": "6.18.0", + "@typescript-eslint/typescript-estree": "6.18.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index a7382e10ae24..0f5e135859a1 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for type-utils to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for type-utils to align it with other projects, there were no code changes. diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index af089fb88a2a..6548eeb9c8a7 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "6.18.0", + "version": "6.18.1", "description": "Type utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -45,13 +45,13 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "6.18.0", - "@typescript-eslint/utils": "6.18.0", + "@typescript-eslint/typescript-estree": "6.18.1", + "@typescript-eslint/utils": "6.18.1", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "devDependencies": { - "@typescript-eslint/parser": "6.18.0", + "@typescript-eslint/parser": "6.18.1", "ajv": "^6.10.0", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index c0e0a4a3f8cb..37f72e1df92d 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for types to align it with other projects, there were no code changes. diff --git a/packages/types/package.json b/packages/types/package.json index 44d83b867531..063eb0e13657 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "6.18.0", + "version": "6.18.1", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index b4004b3fb5b4..059d6a3f5b75 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -1,3 +1,22 @@ +## 6.18.1 (2024-01-08) + + +### 🩹 Fixes + +- **typescript-estree:** fix invalid parsing error when use update expression on non-null assertion + +- **typescript-estree:** only create project service from env setting if project is enabled + + +### ❤️ Thank You + +- auvred +- James +- Josh Goldberg ✨ +- YeonJuan + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 8bdc1dce7da2..1c476dcaa0cf 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "6.18.0", + "version": "6.18.1", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "files": [ "dist", @@ -52,8 +52,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.18.0", - "@typescript-eslint/visitor-keys": "6.18.0", + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 9957501295e6..52ae999b587d 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,3 +1,20 @@ +## 6.18.1 (2024-01-08) + + +### 🩹 Fixes + +- **utils:** improve error message on typed rule with invalid parser + + +### ❤️ Thank You + +- auvred +- James +- Josh Goldberg ✨ +- YeonJuan + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for utils to align it with other projects, there were no code changes. diff --git a/packages/utils/package.json b/packages/utils/package.json index ad435e7103d5..7364a438ba3a 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "6.18.0", + "version": "6.18.1", "description": "Utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -68,16 +68,16 @@ "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.18.0", - "@typescript-eslint/types": "6.18.0", - "@typescript-eslint/typescript-estree": "6.18.0", + "@typescript-eslint/scope-manager": "6.18.1", + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/typescript-estree": "6.18.1", "semver": "^7.5.4" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { - "@typescript-eslint/parser": "6.18.0", + "@typescript-eslint/parser": "6.18.1", "downlevel-dts": "*", "jest": "29.7.0", "prettier": "^3.0.3", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 8c2db7afb0d9..00bf29bb06c1 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for visitor-keys to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 628d3547ed02..db2f5a50d126 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "6.18.0", + "version": "6.18.1", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "files": [ "dist", @@ -45,7 +45,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.18.0", + "@typescript-eslint/types": "6.18.1", "eslint-visitor-keys": "^3.4.1" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index d98715072a66..1009bd6da543 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for website-eslint to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for website-eslint to align it with other projects, there were no code changes. diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index d2f7855a41ed..f0049f1b9905 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "6.18.0", + "version": "6.18.1", "private": true, "description": "ESLint which works in browsers.", "files": [ @@ -23,16 +23,16 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.18.0", - "@typescript-eslint/utils": "6.18.0" + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/utils": "6.18.1" }, "devDependencies": { "@eslint/js": "8.56.0", - "@typescript-eslint/eslint-plugin": "6.18.0", - "@typescript-eslint/parser": "6.18.0", - "@typescript-eslint/scope-manager": "6.18.0", - "@typescript-eslint/typescript-estree": "6.18.0", - "@typescript-eslint/visitor-keys": "6.18.0", + "@typescript-eslint/eslint-plugin": "6.18.1", + "@typescript-eslint/parser": "6.18.1", + "@typescript-eslint/scope-manager": "6.18.1", + "@typescript-eslint/typescript-estree": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1", "esbuild": "~0.19.0", "eslint": "*", "esquery": "*", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index 9b69d63b9e7f..71f7e0e50972 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.18.1 (2024-01-08) + +This was a version bump only for website to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.0 (2024-01-06) This was a version bump only for website to align it with other projects, there were no code changes. diff --git a/packages/website/package.json b/packages/website/package.json index f264914c2af5..bd4b65fe476a 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "6.18.0", + "version": "6.18.1", "private": true, "scripts": { "build": "docusaurus build", @@ -24,8 +24,8 @@ "@docusaurus/theme-common": "~2.4.1", "@mdx-js/react": "1.6.22", "@prettier/sync": "*", - "@typescript-eslint/parser": "6.18.0", - "@typescript-eslint/website-eslint": "6.18.0", + "@typescript-eslint/parser": "6.18.1", + "@typescript-eslint/website-eslint": "6.18.1", "clsx": "^2.0.0", "eslint": "*", "json-schema": "^0.4.0", @@ -50,9 +50,9 @@ "@types/react": "*", "@types/react-helmet": "^6.1.6", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "6.18.0", - "@typescript-eslint/rule-schema-to-typescript-types": "6.18.0", - "@typescript-eslint/types": "6.18.0", + "@typescript-eslint/eslint-plugin": "6.18.1", + "@typescript-eslint/rule-schema-to-typescript-types": "6.18.1", + "@typescript-eslint/types": "6.18.1", "copy-webpack-plugin": "^11.0.0", "cross-fetch": "*", "globby": "^11.1.0", diff --git a/yarn.lock b/yarn.lock index e16b4e030b41..d2167e10ade3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5221,10 +5221,10 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-internal@workspace:packages/eslint-plugin-internal" dependencies: "@prettier/sync": "*" - "@typescript-eslint/rule-tester": 6.18.0 - "@typescript-eslint/scope-manager": 6.18.0 - "@typescript-eslint/type-utils": 6.18.0 - "@typescript-eslint/utils": 6.18.0 + "@typescript-eslint/rule-tester": 6.18.1 + "@typescript-eslint/scope-manager": 6.18.1 + "@typescript-eslint/type-utils": 6.18.1 + "@typescript-eslint/utils": 6.18.1 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5236,8 +5236,8 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-tslint@workspace:packages/eslint-plugin-tslint" dependencies: "@types/lodash": "*" - "@typescript-eslint/parser": 6.18.0 - "@typescript-eslint/utils": 6.18.0 + "@typescript-eslint/parser": 6.18.1 + "@typescript-eslint/utils": 6.18.1 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5248,7 +5248,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/eslint-plugin@6.18.0, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": +"@typescript-eslint/eslint-plugin@6.18.1, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": version: 0.0.0-use.local resolution: "@typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin" dependencies: @@ -5257,12 +5257,12 @@ __metadata: "@types/debug": "*" "@types/marked": "*" "@types/natural-compare": "*" - "@typescript-eslint/rule-schema-to-typescript-types": 6.18.0 - "@typescript-eslint/rule-tester": 6.18.0 - "@typescript-eslint/scope-manager": 6.18.0 - "@typescript-eslint/type-utils": 6.18.0 - "@typescript-eslint/utils": 6.18.0 - "@typescript-eslint/visitor-keys": 6.18.0 + "@typescript-eslint/rule-schema-to-typescript-types": 6.18.1 + "@typescript-eslint/rule-tester": 6.18.1 + "@typescript-eslint/scope-manager": 6.18.1 + "@typescript-eslint/type-utils": 6.18.1 + "@typescript-eslint/utils": 6.18.1 + "@typescript-eslint/visitor-keys": 6.18.1 ajv: ^6.12.6 chalk: ^5.3.0 cross-fetch: "*" @@ -5301,15 +5301,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@6.18.0, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@6.18.1, @typescript-eslint/parser@workspace:packages/parser": version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: "@types/glob": "*" - "@typescript-eslint/scope-manager": 6.18.0 - "@typescript-eslint/types": 6.18.0 - "@typescript-eslint/typescript-estree": 6.18.0 - "@typescript-eslint/visitor-keys": 6.18.0 + "@typescript-eslint/scope-manager": 6.18.1 + "@typescript-eslint/types": 6.18.1 + "@typescript-eslint/typescript-estree": 6.18.1 + "@typescript-eslint/visitor-keys": 6.18.1 debug: ^4.3.4 downlevel-dts: "*" glob: "*" @@ -5341,26 +5341,26 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/rule-schema-to-typescript-types@6.18.0, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": +"@typescript-eslint/rule-schema-to-typescript-types@6.18.1, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types" dependencies: "@prettier/sync": "*" - "@typescript-eslint/type-utils": 6.18.0 - "@typescript-eslint/utils": 6.18.0 + "@typescript-eslint/type-utils": 6.18.1 + "@typescript-eslint/utils": 6.18.1 natural-compare: ^1.4.0 prettier: ^3.0.3 languageName: unknown linkType: soft -"@typescript-eslint/rule-tester@6.18.0, @typescript-eslint/rule-tester@workspace:packages/rule-tester": +"@typescript-eslint/rule-tester@6.18.1, @typescript-eslint/rule-tester@workspace:packages/rule-tester": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-tester@workspace:packages/rule-tester" dependencies: "@types/lodash.merge": 4.6.9 - "@typescript-eslint/parser": 6.18.0 - "@typescript-eslint/typescript-estree": 6.18.0 - "@typescript-eslint/utils": 6.18.0 + "@typescript-eslint/parser": 6.18.1 + "@typescript-eslint/typescript-estree": 6.18.1 + "@typescript-eslint/utils": 6.18.1 ajv: ^6.10.0 chai: ^4.3.7 lodash.merge: 4.6.2 @@ -5374,15 +5374,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/scope-manager@6.18.0, @typescript-eslint/scope-manager@workspace:packages/scope-manager": +"@typescript-eslint/scope-manager@6.18.1, @typescript-eslint/scope-manager@workspace:packages/scope-manager": version: 0.0.0-use.local resolution: "@typescript-eslint/scope-manager@workspace:packages/scope-manager" dependencies: "@prettier/sync": "*" "@types/glob": "*" - "@typescript-eslint/types": 6.18.0 - "@typescript-eslint/typescript-estree": 6.18.0 - "@typescript-eslint/visitor-keys": 6.18.0 + "@typescript-eslint/types": 6.18.1 + "@typescript-eslint/typescript-estree": 6.18.1 + "@typescript-eslint/visitor-keys": 6.18.1 glob: "*" jest-specific-snapshot: "*" make-dir: "*" @@ -5401,13 +5401,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@6.18.0, @typescript-eslint/type-utils@workspace:packages/type-utils": +"@typescript-eslint/type-utils@6.18.1, @typescript-eslint/type-utils@workspace:packages/type-utils": version: 0.0.0-use.local resolution: "@typescript-eslint/type-utils@workspace:packages/type-utils" dependencies: - "@typescript-eslint/parser": 6.18.0 - "@typescript-eslint/typescript-estree": 6.18.0 - "@typescript-eslint/utils": 6.18.0 + "@typescript-eslint/parser": 6.18.1 + "@typescript-eslint/typescript-estree": 6.18.1 + "@typescript-eslint/utils": 6.18.1 ajv: ^6.10.0 debug: ^4.3.4 downlevel-dts: "*" @@ -5424,7 +5424,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/types@6.18.0, @typescript-eslint/types@workspace:packages/types": +"@typescript-eslint/types@6.18.1, @typescript-eslint/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: @@ -5515,14 +5515,14 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/typescript-estree@6.18.0, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": +"@typescript-eslint/typescript-estree@6.18.1, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": version: 0.0.0-use.local resolution: "@typescript-eslint/typescript-estree@workspace:packages/typescript-estree" dependencies: "@babel/code-frame": "*" "@babel/parser": "*" - "@typescript-eslint/types": 6.18.0 - "@typescript-eslint/visitor-keys": 6.18.0 + "@typescript-eslint/types": 6.18.1 + "@typescript-eslint/visitor-keys": 6.18.1 debug: ^4.3.4 glob: "*" globby: ^11.1.0 @@ -5561,17 +5561,17 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@6.18.0, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": +"@typescript-eslint/utils@6.18.1, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": version: 0.0.0-use.local resolution: "@typescript-eslint/utils@workspace:packages/utils" dependencies: "@eslint-community/eslint-utils": ^4.4.0 "@types/json-schema": ^7.0.12 "@types/semver": ^7.5.0 - "@typescript-eslint/parser": 6.18.0 - "@typescript-eslint/scope-manager": 6.18.0 - "@typescript-eslint/types": 6.18.0 - "@typescript-eslint/typescript-estree": 6.18.0 + "@typescript-eslint/parser": 6.18.1 + "@typescript-eslint/scope-manager": 6.18.1 + "@typescript-eslint/types": 6.18.1 + "@typescript-eslint/typescript-estree": 6.18.1 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.0.3 @@ -5601,12 +5601,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@6.18.0, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": +"@typescript-eslint/visitor-keys@6.18.1, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": version: 0.0.0-use.local resolution: "@typescript-eslint/visitor-keys@workspace:packages/visitor-keys" dependencies: "@types/eslint-visitor-keys": "*" - "@typescript-eslint/types": 6.18.0 + "@typescript-eslint/types": 6.18.1 downlevel-dts: "*" eslint-visitor-keys: ^3.4.1 jest: 29.7.0 @@ -5626,18 +5626,18 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/website-eslint@6.18.0, @typescript-eslint/website-eslint@workspace:packages/website-eslint": +"@typescript-eslint/website-eslint@6.18.1, @typescript-eslint/website-eslint@workspace:packages/website-eslint": version: 0.0.0-use.local resolution: "@typescript-eslint/website-eslint@workspace:packages/website-eslint" dependencies: "@eslint/js": 8.56.0 - "@typescript-eslint/eslint-plugin": 6.18.0 - "@typescript-eslint/parser": 6.18.0 - "@typescript-eslint/scope-manager": 6.18.0 - "@typescript-eslint/types": 6.18.0 - "@typescript-eslint/typescript-estree": 6.18.0 - "@typescript-eslint/utils": 6.18.0 - "@typescript-eslint/visitor-keys": 6.18.0 + "@typescript-eslint/eslint-plugin": 6.18.1 + "@typescript-eslint/parser": 6.18.1 + "@typescript-eslint/scope-manager": 6.18.1 + "@typescript-eslint/types": 6.18.1 + "@typescript-eslint/typescript-estree": 6.18.1 + "@typescript-eslint/utils": 6.18.1 + "@typescript-eslint/visitor-keys": 6.18.1 esbuild: ~0.19.0 eslint: "*" esquery: "*" @@ -18863,11 +18863,11 @@ __metadata: "@types/react": "*" "@types/react-helmet": ^6.1.6 "@types/react-router-dom": ^5.3.3 - "@typescript-eslint/eslint-plugin": 6.18.0 - "@typescript-eslint/parser": 6.18.0 - "@typescript-eslint/rule-schema-to-typescript-types": 6.18.0 - "@typescript-eslint/types": 6.18.0 - "@typescript-eslint/website-eslint": 6.18.0 + "@typescript-eslint/eslint-plugin": 6.18.1 + "@typescript-eslint/parser": 6.18.1 + "@typescript-eslint/rule-schema-to-typescript-types": 6.18.1 + "@typescript-eslint/types": 6.18.1 + "@typescript-eslint/website-eslint": 6.18.1 clsx: ^2.0.0 copy-webpack-plugin: ^11.0.0 cross-fetch: "*" From a9ec7b27283550e6b358a86c3df094e5f2cffc43 Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Tue, 9 Jan 2024 22:46:22 +0300 Subject: [PATCH 057/165] feat(eslint-plugin): [prefer-promise-reject-errors] add rule (#8011) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(eslint-plugin): [prefer-promise-reject-errors] new rule! * test: ~100% coverage * docs: add rule docs * test: add some cases * chore: lint --fix * chore: reformat tests * feat: add support for literal computed reject name * chore: lint --fix * refactor: get rid of one @ts-expect-error * docs: refer to the original rule description * test: add few cases * docs: remove some examples * refactor: move check if symbol is from default lib or not to new fn * refactor: assert that rejectVariable is non-nullable * chore: remove assertion in skipChainExpression * test: specify error ranges for invalid test cases * chore: format tests * chore: remove unused check if variable reference is read or not * chore: include rule to `strict-type-checked` config * refactor: simplify isSymbolFromDefaultLibrary * chore: remove ts-expect-error comment * feat: add checks for Promise child classes and unions/intersections * Update packages/eslint-plugin/docs/rules/prefer-promise-reject-errors.md Co-authored-by: Josh Goldberg ✨ * refactor: `program` -> `services.program` * refactor: split unreadable if condition * docs: simplify examples * refactor: rename `isBuiltinSymbolLike.ts` -> `builtinSymbolLikes.ts` * perf: get type of `reject` callee lazily * test: add cases with arrays,never,unknown * feat: add support for `Readonly` and similar * chore: fix lint issues --------- Co-authored-by: Josh Goldberg ✨ --- .../rules/prefer-promise-reject-errors.md | 50 + packages/eslint-plugin/src/configs/all.ts | 2 + .../src/configs/disable-type-checked.ts | 1 + .../src/configs/strict-type-checked.ts | 2 + packages/eslint-plugin/src/rules/index.ts | 2 + .../src/rules/no-throw-literal.ts | 38 +- .../src/rules/prefer-promise-reject-errors.ts | 153 ++ .../prefer-promise-reject-errors.test.ts | 1438 +++++++++++++++++ .../prefer-promise-reject-errors.shot | 28 + packages/type-utils/src/builtinSymbolLikes.ts | 161 ++ packages/type-utils/src/index.ts | 2 + .../src/isSymbolFromDefaultLibrary.ts | 20 + 12 files changed, 1861 insertions(+), 36 deletions(-) create mode 100644 packages/eslint-plugin/docs/rules/prefer-promise-reject-errors.md create mode 100644 packages/eslint-plugin/src/rules/prefer-promise-reject-errors.ts create mode 100644 packages/eslint-plugin/tests/rules/prefer-promise-reject-errors.test.ts create mode 100644 packages/eslint-plugin/tests/schema-snapshots/prefer-promise-reject-errors.shot create mode 100644 packages/type-utils/src/builtinSymbolLikes.ts create mode 100644 packages/type-utils/src/isSymbolFromDefaultLibrary.ts diff --git a/packages/eslint-plugin/docs/rules/prefer-promise-reject-errors.md b/packages/eslint-plugin/docs/rules/prefer-promise-reject-errors.md new file mode 100644 index 000000000000..28e465cf00f1 --- /dev/null +++ b/packages/eslint-plugin/docs/rules/prefer-promise-reject-errors.md @@ -0,0 +1,50 @@ +--- +description: 'Require using Error objects as Promise rejection reasons.' +--- + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-promise-reject-errors** for documentation. + +This rule extends the base [`eslint/prefer-promise-reject-errors`](https://eslint.org/docs/rules/prefer-promise-reject-errors) rule. +It uses type information to enforce that `Promise`s are only rejected with `Error` objects. + +## Examples + + + +### ❌ Incorrect + +```ts +Promise.reject('error'); + +const err = new Error(); +Promise.reject('an ' + err); + +new Promise((resolve, reject) => reject('error')); + +new Promise((resolve, reject) => { + const err = new Error(); + reject('an ' + err); +}); +``` + +### ✅ Correct + +```ts +Promise.reject(new Error()); + +class CustomError extends Error { + // ... +} +Promise.reject(new CustomError()); + +new Promise((resolve, reject) => reject(new Error())); + +new Promise((resolve, reject) => { + class CustomError extends Error { + // ... + } + return reject(new CustomError()); +}); +``` diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index 4f1c1b5bef15..dc510fe9de45 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -126,6 +126,8 @@ export = { '@typescript-eslint/prefer-namespace-keyword': 'error', '@typescript-eslint/prefer-nullish-coalescing': 'error', '@typescript-eslint/prefer-optional-chain': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', '@typescript-eslint/prefer-readonly': 'error', '@typescript-eslint/prefer-readonly-parameter-types': 'error', '@typescript-eslint/prefer-reduce-type-parameter': 'error', diff --git a/packages/eslint-plugin/src/configs/disable-type-checked.ts b/packages/eslint-plugin/src/configs/disable-type-checked.ts index 2fe413146c7b..073c8b10c8a9 100644 --- a/packages/eslint-plugin/src/configs/disable-type-checked.ts +++ b/packages/eslint-plugin/src/configs/disable-type-checked.ts @@ -41,6 +41,7 @@ export = { '@typescript-eslint/prefer-includes': 'off', '@typescript-eslint/prefer-nullish-coalescing': 'off', '@typescript-eslint/prefer-optional-chain': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'off', '@typescript-eslint/prefer-readonly': 'off', '@typescript-eslint/prefer-readonly-parameter-types': 'off', '@typescript-eslint/prefer-reduce-type-parameter': 'off', diff --git a/packages/eslint-plugin/src/configs/strict-type-checked.ts b/packages/eslint-plugin/src/configs/strict-type-checked.ts index 471175b9bba7..8bf73cbe7ee6 100644 --- a/packages/eslint-plugin/src/configs/strict-type-checked.ts +++ b/packages/eslint-plugin/src/configs/strict-type-checked.ts @@ -61,6 +61,8 @@ export = { '@typescript-eslint/prefer-as-const': 'error', '@typescript-eslint/prefer-includes': 'error', '@typescript-eslint/prefer-literal-enum-member': 'error', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'error', '@typescript-eslint/prefer-reduce-type-parameter': 'error', '@typescript-eslint/prefer-return-this-type': 'error', '@typescript-eslint/prefer-ts-expect-error': 'error', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index b6bb67cf7136..2158ec1d018a 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -110,6 +110,7 @@ import preferLiteralEnumMember from './prefer-literal-enum-member'; import preferNamespaceKeyword from './prefer-namespace-keyword'; import preferNullishCoalescing from './prefer-nullish-coalescing'; import preferOptionalChain from './prefer-optional-chain'; +import preferPromiseRejectErrors from './prefer-promise-reject-errors'; import preferReadonly from './prefer-readonly'; import preferReadonlyParameterTypes from './prefer-readonly-parameter-types'; import preferReduceTypeParameter from './prefer-reduce-type-parameter'; @@ -250,6 +251,7 @@ export default { 'prefer-namespace-keyword': preferNamespaceKeyword, 'prefer-nullish-coalescing': preferNullishCoalescing, 'prefer-optional-chain': preferOptionalChain, + 'prefer-promise-reject-errors': preferPromiseRejectErrors, 'prefer-readonly': preferReadonly, 'prefer-readonly-parameter-types': preferReadonlyParameterTypes, 'prefer-reduce-type-parameter': preferReduceTypeParameter, diff --git a/packages/eslint-plugin/src/rules/no-throw-literal.ts b/packages/eslint-plugin/src/rules/no-throw-literal.ts index f1129c252036..f3f5937c7379 100644 --- a/packages/eslint-plugin/src/rules/no-throw-literal.ts +++ b/packages/eslint-plugin/src/rules/no-throw-literal.ts @@ -5,6 +5,7 @@ import * as ts from 'typescript'; import { createRule, getParserServices, + isErrorLike, isTypeAnyType, isTypeUnknownType, } from '../util'; @@ -55,41 +56,6 @@ export default createRule({ ], create(context, [options]) { const services = getParserServices(context); - const checker = services.program.getTypeChecker(); - - function isErrorLike(type: ts.Type): boolean { - if (type.isIntersection()) { - return type.types.some(isErrorLike); - } - if (type.isUnion()) { - return type.types.every(isErrorLike); - } - - const symbol = type.getSymbol(); - if (!symbol) { - return false; - } - - if (symbol.getName() === 'Error') { - const declarations = symbol.getDeclarations() ?? []; - for (const declaration of declarations) { - const sourceFile = declaration.getSourceFile(); - if (services.program.isSourceFileDefaultLibrary(sourceFile)) { - return true; - } - } - } - - if (symbol.flags & (ts.SymbolFlags.Class | ts.SymbolFlags.Interface)) { - for (const baseType of checker.getBaseTypes(type as ts.InterfaceType)) { - if (isErrorLike(baseType)) { - return true; - } - } - } - - return false; - } function checkThrowArgument(node: TSESTree.Node): void { if ( @@ -114,7 +80,7 @@ export default createRule({ return; } - if (isErrorLike(type)) { + if (isErrorLike(services.program, type)) { return; } diff --git a/packages/eslint-plugin/src/rules/prefer-promise-reject-errors.ts b/packages/eslint-plugin/src/rules/prefer-promise-reject-errors.ts new file mode 100644 index 000000000000..69494823e023 --- /dev/null +++ b/packages/eslint-plugin/src/rules/prefer-promise-reject-errors.ts @@ -0,0 +1,153 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import { AST_NODE_TYPES } from '@typescript-eslint/utils'; +import { getDeclaredVariables } from '@typescript-eslint/utils/eslint-utils'; + +import { + createRule, + getParserServices, + isErrorLike, + isFunction, + isIdentifier, + isPromiseConstructorLike, + isPromiseLike, + isReadonlyErrorLike, +} from '../util'; + +export type MessageIds = 'rejectAnError'; + +export type Options = [ + { + allowEmptyReject?: boolean; + }, +]; + +export default createRule({ + name: 'prefer-promise-reject-errors', + meta: { + type: 'suggestion', + docs: { + description: 'Require using Error objects as Promise rejection reasons', + recommended: 'strict', + extendsBaseRule: true, + requiresTypeChecking: true, + }, + schema: [ + { + type: 'object', + properties: { + allowEmptyReject: { + type: 'boolean', + }, + }, + additionalProperties: false, + }, + ], + messages: { + rejectAnError: 'Expected the Promise rejection reason to be an Error.', + }, + }, + defaultOptions: [ + { + allowEmptyReject: false, + }, + ], + create(context, [options]) { + const services = getParserServices(context); + + function checkRejectCall(callExpression: TSESTree.CallExpression): void { + const argument = callExpression.arguments.at(0); + if (argument) { + const type = services.getTypeAtLocation(argument); + if ( + isErrorLike(services.program, type) || + isReadonlyErrorLike(services.program, type) + ) { + return; + } + } else if (options.allowEmptyReject) { + return; + } + + context.report({ + node: callExpression, + messageId: 'rejectAnError', + }); + } + + function skipChainExpression( + node: T, + ): T | TSESTree.ChainElement { + return node.type === AST_NODE_TYPES.ChainExpression + ? node.expression + : node; + } + + function typeAtLocationIsLikePromise(node: TSESTree.Node): boolean { + const type = services.getTypeAtLocation(node); + return ( + isPromiseConstructorLike(services.program, type) || + isPromiseLike(services.program, type) + ); + } + + return { + CallExpression(node): void { + const callee = skipChainExpression(node.callee); + + if (callee.type !== AST_NODE_TYPES.MemberExpression) { + return; + } + + const rejectMethodCalled = callee.computed + ? callee.property.type === AST_NODE_TYPES.Literal && + callee.property.value === 'reject' + : callee.property.name === 'reject'; + + if ( + !rejectMethodCalled || + !typeAtLocationIsLikePromise(callee.object) + ) { + return; + } + + checkRejectCall(node); + }, + NewExpression(node): void { + const callee = skipChainExpression(node.callee); + if ( + !isPromiseConstructorLike( + services.program, + services.getTypeAtLocation(callee), + ) + ) { + return; + } + + const executor = node.arguments.at(0); + if (!executor || !isFunction(executor)) { + return; + } + const rejectParamNode = executor.params.at(1); + if (!rejectParamNode || !isIdentifier(rejectParamNode)) { + return; + } + + // reject param is always present in variables declared by executor + const rejectVariable = getDeclaredVariables(context, executor).find( + variable => variable.identifiers.includes(rejectParamNode), + )!; + + rejectVariable.references.forEach(ref => { + if ( + ref.identifier.parent.type !== AST_NODE_TYPES.CallExpression || + ref.identifier !== ref.identifier.parent.callee + ) { + return; + } + + checkRejectCall(ref.identifier.parent); + }); + }, + }; + }, +}); diff --git a/packages/eslint-plugin/tests/rules/prefer-promise-reject-errors.test.ts b/packages/eslint-plugin/tests/rules/prefer-promise-reject-errors.test.ts new file mode 100644 index 000000000000..69eed002ebf7 --- /dev/null +++ b/packages/eslint-plugin/tests/rules/prefer-promise-reject-errors.test.ts @@ -0,0 +1,1438 @@ +import { noFormat, RuleTester } from '@typescript-eslint/rule-tester'; +import { AST_NODE_TYPES } from '@typescript-eslint/utils'; + +import rule from '../../src/rules/prefer-promise-reject-errors'; +import { getFixturesRootDir } from '../RuleTester'; + +const rootDir = getFixturesRootDir(); +const ruleTester = new RuleTester({ + parserOptions: { + ecmaVersion: 2015, + tsconfigRootDir: rootDir, + project: './tsconfig.json', + }, + parser: '@typescript-eslint/parser', +}); + +ruleTester.run('prefer-promise-reject-errors', rule, { + valid: [ + 'Promise.resolve(5);', + { + code: 'Promise.reject();', + options: [ + { + allowEmptyReject: true, + }, + ], + }, + 'Promise.reject(new Error());', + 'Promise.reject(new TypeError());', + "Promise.reject(new Error('foo'));", + ` + class CustomError extends Error {} + Promise.reject(new CustomError()); + `, + ` + declare const foo: () => { err: SyntaxError }; + Promise.reject(foo().err); + `, + ` + declare const foo: () => Promise; + Promise.reject(await foo()); + `, + 'Promise.reject((foo = new Error()));', + ` + const foo = Promise; + foo.reject(new Error()); + `, + "Promise['reject'](new Error());", + 'Promise.reject(true && new Error());', + ` + const foo = false; + Promise.reject(false || new Error()); + `, + ` + declare const foo: Readonly; + Promise.reject(foo); + `, + ` + declare const foo: Readonly | Readonly; + Promise.reject(foo); + `, + ` + declare const foo: Readonly & Readonly; + Promise.reject(foo); + `, + ` + declare const foo: Readonly & { foo: 'bar' }; + Promise.reject(foo); + `, + ` + declare const foo: Readonly & { foo: 'bar' }; + Promise.reject(foo); + `, + ` + declare const foo: Readonly>; + Promise.reject(foo); + `, + ` + declare const foo: Readonly>>; + Promise.reject(foo); + `, + ` + declare const foo: Readonly< + Readonly & { foo: 'bar' }> & { + fooBar: 'barFoo'; + } + > & { barFoo: 'fooBar' }; + Promise.reject(foo); + `, + ` + declare const foo: + | Readonly | Readonly> + | Readonly; + Promise.reject(foo); + `, + ` + type Wrapper = { foo: Readonly[] }; + declare const foo: Wrapper['foo'][5]; + Promise.reject(foo); + `, + ` + declare const foo: Error[]; + Promise.reject(foo[5]); + `, + ` + declare const foo: ReadonlyArray; + Promise.reject(foo[5]); + `, + ` + declare const foo: [Error]; + Promise.reject(foo[0]); + `, + + ` + new Promise(function (resolve, reject) { + resolve(5); + }); + `, + ` + new Promise(function (resolve, reject) { + reject(new Error()); + }); + `, + ` + new Promise((resolve, reject) => { + reject(new Error()); + }); + `, + 'new Promise((resolve, reject) => reject(new Error()));', + { + code: ` + new Promise(function (resolve, reject) { + reject(); + }); + `, + options: [ + { + allowEmptyReject: true, + }, + ], + }, + 'new Promise((yes, no) => no(new Error()));', + 'new Promise();', + 'new Promise(5);', + 'new Promise((resolve, { apply }) => {});', + 'new Promise((resolve, reject) => {});', + 'new Promise((resolve, reject) => reject);', + ` + class CustomError extends Error {} + new Promise(function (resolve, reject) { + reject(new CustomError()); + }); + `, + ` + declare const foo: () => { err: SyntaxError }; + new Promise(function (resolve, reject) { + reject(foo().err); + }); + `, + 'new Promise((resolve, reject) => reject((foo = new Error())));', + ` + new Foo((resolve, reject) => reject(5)); + `, + ` + class Foo { + constructor( + executor: (resolve: () => void, reject: (reason?: any) => void) => void, + ): Promise {} + } + new Foo((resolve, reject) => reject(5)); + `, + ` + new Promise((resolve, reject) => { + return function (reject) { + reject(5); + }; + }); + `, + 'new Promise((resolve, reject) => resolve(5, reject));', + ` + class C { + #error: Error; + foo() { + Promise.reject(this.#error); + } + } + `, + ` + const foo = Promise; + new foo((resolve, reject) => reject(new Error())); + `, + ` + declare const foo: Readonly; + new Promise((resolve, reject) => reject(foo)); + `, + ` + declare const foo: Readonly | Readonly; + new Promise((resolve, reject) => reject(foo)); + `, + ` + declare const foo: Readonly & Readonly; + new Promise((resolve, reject) => reject(foo)); + `, + ` + declare const foo: Readonly & { foo: 'bar' }; + new Promise((resolve, reject) => reject(foo)); + `, + ` + declare const foo: Readonly & { foo: 'bar' }; + new Promise((resolve, reject) => reject(foo)); + `, + ` + declare const foo: Readonly>; + new Promise((resolve, reject) => reject(foo)); + `, + ` + declare const foo: Readonly>>; + new Promise((resolve, reject) => reject(foo)); + `, + ` + declare const foo: Readonly< + Readonly & { foo: 'bar' }> & { + fooBar: 'barFoo'; + } + > & { barFoo: 'fooBar' }; + new Promise((resolve, reject) => reject(foo)); + `, + ` + declare const foo: + | Readonly | Readonly> + | Readonly; + new Promise((resolve, reject) => reject(foo)); + `, + ` + type Wrapper = { foo: Readonly[] }; + declare const foo: Wrapper['foo'][5]; + new Promise((resolve, reject) => reject(foo)); + `, + ` + declare const foo: Error[]; + new Promise((resolve, reject) => reject(foo[5])); + `, + ` + declare const foo: ReadonlyArray; + new Promise((resolve, reject) => reject(foo[5])); + `, + ` + declare const foo: [Error]; + new Promise((resolve, reject) => reject(foo[0])); + `, + ` + class Foo extends Promise {} + Foo.reject(new Error()); + `, + ` + class Foo extends Promise {} + new Foo((resolve, reject) => reject(new Error())); + `, + ` + declare const someRandomCall: { + reject(arg: any): void; + }; + someRandomCall.reject(5); + `, + ` + declare const foo: PromiseConstructor; + foo.reject(new Error()); + `, + ], + invalid: [ + { + code: 'Promise.reject(5);', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 18, + }, + ], + }, + { + code: "Promise.reject('foo');", + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 22, + }, + ], + }, + { + code: 'Promise.reject(`foo`);', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 22, + }, + ], + }, + { + code: "Promise.reject('foo', somethingElse);", + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 37, + }, + ], + }, + { + code: 'Promise.reject(false);', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 22, + }, + ], + }, + { + code: 'Promise.reject(void `foo`);', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 27, + }, + ], + }, + { + code: 'Promise.reject();', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 17, + }, + ], + }, + { + code: 'Promise.reject(undefined);', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 26, + }, + ], + }, + { + code: 'Promise.reject(undefined);', + options: [{ allowEmptyReject: true }], + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 26, + }, + ], + }, + { + code: 'Promise.reject(null);', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 21, + }, + ], + }, + { + code: 'Promise.reject({ foo: 1 });', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 27, + }, + ], + }, + { + code: 'Promise.reject([1, 2, 3]);', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 26, + }, + ], + }, + { + code: ` +declare const foo: Error | undefined; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: () => Promise; +Promise.reject(await foo()); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 28, + }, + ], + }, + { + code: ` +declare const foo: boolean; +Promise.reject(foo && new Error()); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 35, + }, + ], + }, + { + code: ` +const foo = Promise; +foo.reject(); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 13, + }, + ], + }, + + { + code: 'Promise.reject?.(5);', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: 'Promise?.reject(5);', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 19, + }, + ], + }, + { + code: 'Promise?.reject?.(5);', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 21, + }, + ], + }, + { + code: '(Promise?.reject)(5);', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 21, + }, + ], + }, + { + code: noFormat`(Promise?.reject)?.(5);`, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 23, + }, + ], + }, + { + code: "Promise['reject'](5);", + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 21, + }, + ], + }, + + // Assignments with mathematical operators will either evaluate to a primitive value or throw a TypeError + { + code: 'Promise.reject((foo += new Error()));', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 37, + }, + ], + }, + { + code: 'Promise.reject((foo -= new Error()));', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 37, + }, + ], + }, + { + code: 'Promise.reject((foo **= new Error()));', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 38, + }, + ], + }, + { + code: 'Promise.reject((foo <<= new Error()));', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 38, + }, + ], + }, + { + code: 'Promise.reject((foo |= new Error()));', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 37, + }, + ], + }, + { + code: 'Promise.reject((foo &= new Error()));', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 1, + endColumn: 37, + }, + ], + }, + { + code: ` +declare const foo: never; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: unknown; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +type FakeReadonly = { 'fake readonly': T }; +declare const foo: FakeReadonly; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 4, + endLine: 4, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: Readonly<'error'>; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: Readonly; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: Readonly | 'error'; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: Readonly | Readonly | Readonly<'error'>; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: Readonly>; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: Readonly | 'error'>>; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: Readonly & TypeError>> | 'error'; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: Readonly> | Readonly | 'error'; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +type Wrapper = { foo: Readonly[] }; +declare const foo: Wrapper['foo'][5]; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 4, + endLine: 4, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: Error[]; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: ReadonlyArray; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + { + code: ` +declare const foo: [Error]; +Promise.reject(foo); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 20, + }, + ], + }, + + { + code: ` +new Promise(function (resolve, reject) { + reject(); +}); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 3, + endColumn: 11, + }, + ], + }, + { + code: ` +new Promise(function (resolve, reject) { + reject(5); +}); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 3, + endColumn: 12, + }, + ], + }, + { + code: ` +new Promise((resolve, reject) => { + reject(); +}); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 3, + endColumn: 11, + }, + ], + }, + { + code: 'new Promise((resolve, reject) => reject(5));', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 34, + endColumn: 43, + }, + ], + }, + { + code: ` +new Promise((resolve, reject) => { + fs.readFile('foo.txt', (err, file) => { + if (err) reject('File not found'); + else resolve(file); + }); +}); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 4, + endLine: 4, + column: 14, + endColumn: 38, + }, + ], + }, + { + code: 'new Promise((yes, no) => no(5));', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 26, + endColumn: 31, + }, + ], + }, + { + code: 'new Promise(({ foo, bar, baz }, reject) => reject(5));', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 44, + endColumn: 53, + }, + ], + }, + { + code: ` +new Promise(function (reject, reject) { + reject(5); +}); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 3, + endColumn: 12, + }, + ], + }, + { + code: ` +new Promise(function (foo, arguments) { + arguments(5); +}); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 3, + endColumn: 15, + }, + ], + }, + { + code: 'new Promise((foo, arguments) => arguments(5));', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 33, + endColumn: 45, + }, + ], + }, + { + code: ` +new Promise(function ({}, reject) { + reject(5); +}); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 3, + endColumn: 12, + }, + ], + }, + { + code: 'new Promise(({}, reject) => reject(5));', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 29, + endColumn: 38, + }, + ], + }, + { + code: 'new Promise((resolve, reject, somethingElse = reject(5)) => {});', + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 1, + endLine: 1, + column: 47, + endColumn: 56, + }, + ], + }, + { + code: ` +declare const foo: { + bar: PromiseConstructor; +}; +new foo.bar((resolve, reject) => reject(5)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 5, + endLine: 5, + column: 34, + endColumn: 43, + }, + ], + }, + { + code: ` +declare const foo: { + bar: PromiseConstructor; +}; +new (foo?.bar)((resolve, reject) => reject(5)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 5, + endLine: 5, + column: 37, + endColumn: 46, + }, + ], + }, + { + code: ` +const foo = Promise; +new foo((resolve, reject) => reject(5)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 30, + endColumn: 39, + }, + ], + }, + { + code: ` +declare const foo: never; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: unknown; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +type FakeReadonly = { 'fake readonly': T }; +declare const foo: FakeReadonly; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 4, + endLine: 4, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: Readonly<'error'>; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: Readonly; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: Readonly | 'error'; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: Readonly | Readonly | Readonly<'error'>; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: Readonly>; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: Readonly | 'error'>>; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: Readonly & TypeError>> | 'error'; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: Readonly> | Readonly | 'error'; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +type Wrapper = { foo: Readonly[] }; +declare const foo: Wrapper['foo'][5]; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 4, + endLine: 4, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: Error[]; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: ReadonlyArray; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +declare const foo: [Error]; +new Promise((resolve, reject) => reject(foo)); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 34, + endColumn: 45, + }, + ], + }, + { + code: ` +class Foo extends Promise {} +Foo.reject(5); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 14, + }, + ], + }, + { + code: ` +declare const foo: PromiseConstructor & string; +foo.reject(5); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 3, + endLine: 3, + column: 1, + endColumn: 14, + }, + ], + }, + { + code: ` +class Foo extends Promise {} +class Bar extends Foo {} +Bar.reject(5); + `, + errors: [ + { + messageId: 'rejectAnError', + type: AST_NODE_TYPES.CallExpression, + line: 4, + endLine: 4, + column: 1, + endColumn: 14, + }, + ], + }, + ], +}); diff --git a/packages/eslint-plugin/tests/schema-snapshots/prefer-promise-reject-errors.shot b/packages/eslint-plugin/tests/schema-snapshots/prefer-promise-reject-errors.shot new file mode 100644 index 000000000000..fc04d11fd3f1 --- /dev/null +++ b/packages/eslint-plugin/tests/schema-snapshots/prefer-promise-reject-errors.shot @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Rule schemas should be convertible to TS types for documentation purposes prefer-promise-reject-errors 1`] = ` +" +# SCHEMA: + +[ + { + "additionalProperties": false, + "properties": { + "allowEmptyReject": { + "type": "boolean" + } + }, + "type": "object" + } +] + + +# TYPES: + +type Options = [ + { + allowEmptyReject?: boolean; + }, +]; +" +`; diff --git a/packages/type-utils/src/builtinSymbolLikes.ts b/packages/type-utils/src/builtinSymbolLikes.ts new file mode 100644 index 000000000000..3443a0d0382e --- /dev/null +++ b/packages/type-utils/src/builtinSymbolLikes.ts @@ -0,0 +1,161 @@ +import * as ts from 'typescript'; + +import { isSymbolFromDefaultLibrary } from './isSymbolFromDefaultLibrary'; + +/** + * class Foo extends Promise {} + * Foo.reject + * ^ PromiseLike + */ +export function isPromiseLike(program: ts.Program, type: ts.Type): boolean { + return isBuiltinSymbolLike(program, type, 'Promise'); +} + +/** + * const foo = Promise + * foo.reject + * ^ PromiseConstructorLike + */ +export function isPromiseConstructorLike( + program: ts.Program, + type: ts.Type, +): boolean { + return isBuiltinSymbolLike(program, type, 'PromiseConstructor'); +} + +/** + * class Foo extends Error {} + * new Foo() + * ^ ErrorLike + */ +export function isErrorLike(program: ts.Program, type: ts.Type): boolean { + return isBuiltinSymbolLike(program, type, 'Error'); +} + +/** + * type T = Readonly + * ^ ReadonlyErrorLike + */ +export function isReadonlyErrorLike( + program: ts.Program, + type: ts.Type, +): boolean { + return isReadonlyTypeLike(program, type, subtype => { + const [typeArgument] = subtype.aliasTypeArguments; + return ( + isErrorLike(program, typeArgument) || + isReadonlyErrorLike(program, typeArgument) + ); + }); +} + +/** + * type T = Readonly<{ foo: 'bar' }> + * ^ ReadonlyTypeLike + */ +export function isReadonlyTypeLike( + program: ts.Program, + type: ts.Type, + predicate?: ( + subType: ts.Type & { + aliasSymbol: ts.Symbol; + aliasTypeArguments: readonly ts.Type[]; + }, + ) => boolean, +): boolean { + return isBuiltinTypeAliasLike(program, type, subtype => { + return ( + subtype.aliasSymbol.getName() === 'Readonly' && !!predicate?.(subtype) + ); + }); +} +export function isBuiltinTypeAliasLike( + program: ts.Program, + type: ts.Type, + predicate: ( + subType: ts.Type & { + aliasSymbol: ts.Symbol; + aliasTypeArguments: readonly ts.Type[]; + }, + ) => boolean, +): boolean { + return isBuiltinSymbolLikeRecurser(program, type, subtype => { + const { aliasSymbol, aliasTypeArguments } = subtype; + + if (!aliasSymbol || !aliasTypeArguments) { + return false; + } + + if ( + isSymbolFromDefaultLibrary(program, aliasSymbol) && + predicate( + subtype as ts.Type & { + aliasSymbol: ts.Symbol; + aliasTypeArguments: readonly ts.Type[]; + }, + ) + ) { + return true; + } + + return null; + }); +} + +export function isBuiltinSymbolLike( + program: ts.Program, + type: ts.Type, + symbolName: string, +): boolean { + return isBuiltinSymbolLikeRecurser(program, type, subType => { + const symbol = subType.getSymbol(); + if (!symbol) { + return false; + } + + if ( + symbol.getName() === symbolName && + isSymbolFromDefaultLibrary(program, symbol) + ) { + return true; + } + + return null; + }); +} + +export function isBuiltinSymbolLikeRecurser( + program: ts.Program, + type: ts.Type, + predicate: (subType: ts.Type) => boolean | null, +): boolean { + if (type.isIntersection()) { + return type.types.some(t => + isBuiltinSymbolLikeRecurser(program, t, predicate), + ); + } + if (type.isUnion()) { + return type.types.every(t => + isBuiltinSymbolLikeRecurser(program, t, predicate), + ); + } + + const predicateResult = predicate(type); + if (typeof predicateResult === 'boolean') { + return predicateResult; + } + + const symbol = type.getSymbol(); + if ( + symbol && + symbol.flags & (ts.SymbolFlags.Class | ts.SymbolFlags.Interface) + ) { + const checker = program.getTypeChecker(); + for (const baseType of checker.getBaseTypes(type as ts.InterfaceType)) { + if (isBuiltinSymbolLikeRecurser(program, baseType, predicate)) { + return true; + } + } + } + return false; +} diff --git a/packages/type-utils/src/index.ts b/packages/type-utils/src/index.ts index 9fc499aa8f31..14d5b652099f 100644 --- a/packages/type-utils/src/index.ts +++ b/packages/type-utils/src/index.ts @@ -1,3 +1,4 @@ +export * from './builtinSymbolLikes'; export * from './containsAllTypesByName'; export * from './getConstrainedTypeAtLocation'; export * from './getContextualType'; @@ -6,6 +7,7 @@ export * from './getSourceFileOfNode'; export * from './getTokenAtPosition'; export * from './getTypeArguments'; export * from './getTypeName'; +export * from './isSymbolFromDefaultLibrary'; export * from './isTypeReadonly'; export * from './isUnsafeAssignment'; export * from './predicates'; diff --git a/packages/type-utils/src/isSymbolFromDefaultLibrary.ts b/packages/type-utils/src/isSymbolFromDefaultLibrary.ts new file mode 100644 index 000000000000..786ef849a2c4 --- /dev/null +++ b/packages/type-utils/src/isSymbolFromDefaultLibrary.ts @@ -0,0 +1,20 @@ +import type * as ts from 'typescript'; + +export function isSymbolFromDefaultLibrary( + program: ts.Program, + symbol: ts.Symbol | undefined, +): boolean { + if (!symbol) { + return false; + } + + const declarations = symbol.getDeclarations() ?? []; + for (const declaration of declarations) { + const sourceFile = declaration.getSourceFile(); + if (program.isSourceFileDefaultLibrary(sourceFile)) { + return true; + } + } + + return false; +} From edf4870102d6f1e7b51e78e8342f3ab5da9a5fde Mon Sep 17 00:00:00 2001 From: Gabriel Costa Date: Tue, 9 Jan 2024 16:51:50 -0300 Subject: [PATCH 058/165] docs: base Testing Rules documentation (#8033) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: base Testing Rules documentation * fix(eslint-plugin): add no-unsafe-unary-minus, prefer-destructuring to disable-type-checked (#8038) fix: add no-unsafe-unary-minus, prefer-destructuring to disable-type-checked * docs: testing rules review changes + build callout * docs(eslint-plugin): [require-array-sort-compare] sync rule description (#8061) * chore: resolve internal lint issues with new no-useless-template-literals rule (#8060) * docs(eslint-plugin): [require-array-sort-compare] generalize sort method names (#8062) docs: streamline * chore: update sponsors (#8069) Co-authored-by: typescript-eslint[bot] * Update docs/contributing/local-development/Local_Linking.mdx Co-authored-by: Josh Goldberg ✨ * docs: changed section name + callout type from caution to note --------- Co-authored-by: Josh Goldberg ✨ Co-authored-by: auvred <61150013+auvred@users.noreply.github.com> Co-authored-by: James <5511220+Zamiell@users.noreply.github.com> Co-authored-by: typescript-eslint[bot] <53356952+typescript-eslint[bot]@users.noreply.github.com> Co-authored-by: typescript-eslint[bot] Co-authored-by: Gabriel Costa Moura --- .../local-development/Local_Linking.mdx | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/contributing/local-development/Local_Linking.mdx b/docs/contributing/local-development/Local_Linking.mdx index 00908758485c..7c7b6cdaf086 100644 --- a/docs/contributing/local-development/Local_Linking.mdx +++ b/docs/contributing/local-development/Local_Linking.mdx @@ -8,6 +8,7 @@ The general strategy to do so is: 1. [Global linking](#global-linking): Use your package manager's global link command to make `@typescript-eslint/*` packages available as global symlinks. 2. [Repository linking](#repository-linking): Use your package manager's link command to reference those global symlinks in the local downstream repository. +3. [Trying rules](#trying-rules): Test your local rules and plugins by enabling them in the local downstream repository. ## Global Linking @@ -45,6 +46,27 @@ Now, you should be able to run ESLint in the local downstream repository as you To check that the local package is being used, consider adding a `console.log("Hello, world!");` to a file such as `./packages/eslint-plugin/dist/index.js` and making sure that log appears when linting the local downstream repository. ::: +## Trying Rules + +Now that you've linked the `@typescript-eslint/*` packages with your local downstream repository, the next step would be to include the rule on the local repository ESLint configuration file, e.g: + +```json title=".eslintrc.json" +{ + "rules": { + "@typescript-eslint/your-awesome-rule": "error" + } + // ... +} +``` + +After that, you need to run your repository's `lint` script and your changes should be reflected on the project. + +:::note +Changes to `@typescript-eslint/` packages will not be reflected inside your linked repository until they're built locally. +To re-build all packages, run `yarn build` from the root. +To start a watch mode builder on just the ESLint plugin, run `yarn build --watch` from `./packages/eslint-plugin`. +::: + ## Troubleshooting ### Packages Not Found (`Cannot find module`) From 45cce54b403fb59405d817838333928b05b1764b Mon Sep 17 00:00:00 2001 From: StyleShit <32631382+StyleShit@users.noreply.github.com> Date: Tue, 9 Jan 2024 22:01:34 +0200 Subject: [PATCH 059/165] feat(eslint-plugin): [no-array-delete] add new rule (#8067) * feat(eslint-plugin): [no-array-delete] add new rule * small refactor * add more cases * fix docs * fix message * use suggestion instead of fix * added more test cases * remove redundant condition * keep comments --- .../docs/rules/no-array-delete.md | 40 ++ packages/eslint-plugin/src/configs/all.ts | 1 + .../src/configs/disable-type-checked.ts | 1 + .../src/configs/strict-type-checked.ts | 1 + packages/eslint-plugin/src/rules/index.ts | 2 + .../src/rules/no-array-delete.ts | 112 ++++ .../tests/rules/no-array-delete.test.ts | 599 ++++++++++++++++++ .../schema-snapshots/no-array-delete.shot | 14 + 8 files changed, 770 insertions(+) create mode 100644 packages/eslint-plugin/docs/rules/no-array-delete.md create mode 100644 packages/eslint-plugin/src/rules/no-array-delete.ts create mode 100644 packages/eslint-plugin/tests/rules/no-array-delete.test.ts create mode 100644 packages/eslint-plugin/tests/schema-snapshots/no-array-delete.shot diff --git a/packages/eslint-plugin/docs/rules/no-array-delete.md b/packages/eslint-plugin/docs/rules/no-array-delete.md new file mode 100644 index 000000000000..3abbbc6ececc --- /dev/null +++ b/packages/eslint-plugin/docs/rules/no-array-delete.md @@ -0,0 +1,40 @@ +--- +description: 'Disallow using the `delete` operator on array values.' +--- + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-array-delete** for documentation. + +When using the `delete` operator with an array value, the array's `length` property is not affected, +but the element at the specified index is removed and leaves an empty slot in the array. +This is likely to lead to unexpected behavior. As mentioned in the +[MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#deleting_array_elements), +the recommended way to remove an element from an array is by using the +[`Array#splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) method. + +## Examples + + + +### ❌ Incorrect + +```ts +declare const arr: number[]; + +delete arr[0]; +``` + +### ✅ Correct + +```ts +declare const arr: number[]; + +arr.splice(0, 1); +``` + + + +## When Not To Use It + +When you want to allow the delete operator with array expressions. diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index dc510fe9de45..b2fe978c8aec 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -39,6 +39,7 @@ export = { '@typescript-eslint/naming-convention': 'error', 'no-array-constructor': 'off', '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-array-delete': 'error', '@typescript-eslint/no-base-to-string': 'error', '@typescript-eslint/no-confusing-non-null-assertion': 'error', '@typescript-eslint/no-confusing-void-expression': 'error', diff --git a/packages/eslint-plugin/src/configs/disable-type-checked.ts b/packages/eslint-plugin/src/configs/disable-type-checked.ts index 073c8b10c8a9..4cd82bf2414e 100644 --- a/packages/eslint-plugin/src/configs/disable-type-checked.ts +++ b/packages/eslint-plugin/src/configs/disable-type-checked.ts @@ -12,6 +12,7 @@ export = { '@typescript-eslint/consistent-type-exports': 'off', '@typescript-eslint/dot-notation': 'off', '@typescript-eslint/naming-convention': 'off', + '@typescript-eslint/no-array-delete': 'off', '@typescript-eslint/no-base-to-string': 'off', '@typescript-eslint/no-confusing-void-expression': 'off', '@typescript-eslint/no-duplicate-type-constituents': 'off', diff --git a/packages/eslint-plugin/src/configs/strict-type-checked.ts b/packages/eslint-plugin/src/configs/strict-type-checked.ts index 8bf73cbe7ee6..a0f82563b1f3 100644 --- a/packages/eslint-plugin/src/configs/strict-type-checked.ts +++ b/packages/eslint-plugin/src/configs/strict-type-checked.ts @@ -13,6 +13,7 @@ export = { '@typescript-eslint/ban-types': 'error', 'no-array-constructor': 'off', '@typescript-eslint/no-array-constructor': 'error', + '@typescript-eslint/no-array-delete': 'error', '@typescript-eslint/no-base-to-string': 'error', '@typescript-eslint/no-confusing-void-expression': 'error', '@typescript-eslint/no-duplicate-enum-values': 'error', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index 2158ec1d018a..a5eb9a933467 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -34,6 +34,7 @@ import memberOrdering from './member-ordering'; import methodSignatureStyle from './method-signature-style'; import namingConvention from './naming-convention'; import noArrayConstructor from './no-array-constructor'; +import noArrayDelete from './no-array-delete'; import noBaseToString from './no-base-to-string'; import confusingNonNullAssertionLikeNotEqual from './no-confusing-non-null-assertion'; import noConfusingVoidExpression from './no-confusing-void-expression'; @@ -175,6 +176,7 @@ export default { 'method-signature-style': methodSignatureStyle, 'naming-convention': namingConvention, 'no-array-constructor': noArrayConstructor, + 'no-array-delete': noArrayDelete, 'no-base-to-string': noBaseToString, 'no-confusing-non-null-assertion': confusingNonNullAssertionLikeNotEqual, 'no-confusing-void-expression': noConfusingVoidExpression, diff --git a/packages/eslint-plugin/src/rules/no-array-delete.ts b/packages/eslint-plugin/src/rules/no-array-delete.ts new file mode 100644 index 000000000000..141332e06382 --- /dev/null +++ b/packages/eslint-plugin/src/rules/no-array-delete.ts @@ -0,0 +1,112 @@ +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; +import { AST_NODE_TYPES, AST_TOKEN_TYPES } from '@typescript-eslint/utils'; +import { getSourceCode } from '@typescript-eslint/utils/eslint-utils'; +import type * as ts from 'typescript'; + +import { + createRule, + getConstrainedTypeAtLocation, + getParserServices, +} from '../util'; + +type MessageId = 'noArrayDelete' | 'useSplice'; + +export default createRule<[], MessageId>({ + name: 'no-array-delete', + meta: { + hasSuggestions: true, + type: 'problem', + docs: { + description: 'Disallow using the `delete` operator on array values', + recommended: 'strict', + requiresTypeChecking: true, + }, + messages: { + noArrayDelete: + 'Using the `delete` operator with an array expression is unsafe.', + useSplice: 'Use `array.splice()` instead.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = getParserServices(context); + const checker = services.program.getTypeChecker(); + + function isUnderlyingTypeArray(type: ts.Type): boolean { + const predicate = (t: ts.Type): boolean => + checker.isArrayType(t) || checker.isTupleType(t); + + if (type.isUnion()) { + return type.types.every(predicate); + } + + if (type.isIntersection()) { + return type.types.some(predicate); + } + + return predicate(type); + } + + return { + 'UnaryExpression[operator="delete"]'( + node: TSESTree.UnaryExpression, + ): void { + const { argument } = node; + + if (argument.type !== AST_NODE_TYPES.MemberExpression) { + return; + } + + const type = getConstrainedTypeAtLocation(services, argument.object); + + if (!isUnderlyingTypeArray(type)) { + return; + } + + context.report({ + node, + messageId: 'noArrayDelete', + suggest: [ + { + messageId: 'useSplice', + fix(fixer): TSESLint.RuleFix | null { + const { object, property } = argument; + + const shouldHaveParentheses = + property.type === AST_NODE_TYPES.SequenceExpression; + + const nodeMap = services.esTreeNodeToTSNodeMap; + const target = nodeMap.get(object).getText(); + const rawKey = nodeMap.get(property).getText(); + const key = shouldHaveParentheses ? `(${rawKey})` : rawKey; + + let suggestion = `${target}.splice(${key}, 1)`; + + const sourceCode = getSourceCode(context); + const comments = sourceCode.getCommentsInside(node); + + if (comments.length > 0) { + const indentationCount = node.loc.start.column; + const indentation = ' '.repeat(indentationCount); + + const commentsText = comments + .map(comment => { + return comment.type === AST_TOKEN_TYPES.Line + ? `//${comment.value}` + : `/*${comment.value}*/`; + }) + .join(`\n${indentation}`); + + suggestion = `${commentsText}\n${indentation}${suggestion}`; + } + + return fixer.replaceText(node, suggestion); + }, + }, + ], + }); + }, + }; + }, +}); diff --git a/packages/eslint-plugin/tests/rules/no-array-delete.test.ts b/packages/eslint-plugin/tests/rules/no-array-delete.test.ts new file mode 100644 index 000000000000..ac803cb5b2f8 --- /dev/null +++ b/packages/eslint-plugin/tests/rules/no-array-delete.test.ts @@ -0,0 +1,599 @@ +import { noFormat, RuleTester } from '@typescript-eslint/rule-tester'; + +import rule from '../../src/rules/no-array-delete'; +import { getFixturesRootDir } from '../RuleTester'; + +const rootPath = getFixturesRootDir(); + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', + parserOptions: { + tsconfigRootDir: rootPath, + project: './tsconfig.json', + }, +}); + +ruleTester.run('no-array-delete', rule, { + valid: [ + ` + declare const obj: { a: 1; b: 2 }; + delete obj.a; + `, + + ` + declare const obj: { a: 1; b: 2 }; + delete obj['a']; + `, + + ` + declare const arr: { a: 1; b: 2 }[][][][]; + delete arr[0][0][0][0].a; + `, + + ` + declare const maybeArray: any; + delete maybeArray[0]; + `, + + ` + declare const maybeArray: unknown; + delete maybeArray[0]; + `, + + ` + declare function getObject(): T; + delete getObject().a; + `, + + ` + declare function getObject(): { a: T; b: 2 }; + delete getObject().a; + `, + + ` + declare const test: never; + delete test[0]; + `, + ], + + invalid: [ + { + code: ` + declare const arr: number[]; + delete arr[0]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 9, + endColumn: 22, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const arr: number[]; + arr.splice(0, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare const arr: number[]; + declare const key: number; + delete arr[key]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 4, + column: 9, + endColumn: 24, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const arr: number[]; + declare const key: number; + arr.splice(key, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare const arr: number[]; + + enum Keys { + A, + B, + } + + delete arr[Keys.A]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 9, + column: 9, + endColumn: 27, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const arr: number[]; + + enum Keys { + A, + B, + } + + arr.splice(Keys.A, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare const arr: number[]; + declare function doWork(): void; + delete arr[(doWork(), 1)]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 4, + column: 9, + endColumn: 34, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const arr: number[]; + declare function doWork(): void; + arr.splice((doWork(), 1), 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare const arr: Array; + delete arr[0]; + `, + + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 9, + endColumn: 22, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const arr: Array; + arr.splice(0, 1); + `, + }, + ], + }, + ], + }, + + { + code: 'delete [1, 2, 3][0];', + errors: [ + { + messageId: 'noArrayDelete', + line: 1, + column: 1, + endColumn: 20, + suggestions: [ + { + messageId: 'useSplice', + output: '[1, 2, 3].splice(0, 1);', + }, + ], + }, + ], + }, + + { + code: ` + declare const arr: unknown[]; + delete arr[Math.random() ? 0 : 1]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 9, + endColumn: 42, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const arr: unknown[]; + arr.splice(Math.random() ? 0 : 1, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare const arr: number[] | string[] | boolean[]; + delete arr[0]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 9, + endColumn: 22, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const arr: number[] | string[] | boolean[]; + arr.splice(0, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare const arr: number[] & unknown; + delete arr[0]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 9, + endColumn: 22, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const arr: number[] & unknown; + arr.splice(0, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare const arr: (number | string)[]; + delete arr[0]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 9, + endColumn: 22, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const arr: (number | string)[]; + arr.splice(0, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare const obj: { a: { b: { c: number[] } } }; + delete obj.a.b.c[0]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 9, + endColumn: 28, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const obj: { a: { b: { c: number[] } } }; + obj.a.b.c.splice(0, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare function getArray(): T; + delete getArray()[0]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 9, + endColumn: 29, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare function getArray(): T; + getArray().splice(0, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare function getArray(): T[]; + delete getArray()[0]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 9, + endColumn: 29, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare function getArray(): T[]; + getArray().splice(0, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + function deleteFromArray(a: number[]) { + delete a[0]; + } + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 11, + endColumn: 22, + suggestions: [ + { + messageId: 'useSplice', + output: ` + function deleteFromArray(a: number[]) { + a.splice(0, 1); + } + `, + }, + ], + }, + ], + }, + + { + code: ` + function deleteFromArray(a: T[]) { + delete a[0]; + } + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 11, + endColumn: 22, + suggestions: [ + { + messageId: 'useSplice', + output: ` + function deleteFromArray(a: T[]) { + a.splice(0, 1); + } + `, + }, + ], + }, + ], + }, + + { + code: ` + function deleteFromArray(a: T) { + delete a[0]; + } + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 11, + endColumn: 22, + suggestions: [ + { + messageId: 'useSplice', + output: ` + function deleteFromArray(a: T) { + a.splice(0, 1); + } + `, + }, + ], + }, + ], + }, + + { + code: ` + declare const tuple: [number, string]; + delete tuple[0]; + `, + errors: [ + { + messageId: 'noArrayDelete', + line: 3, + column: 9, + endColumn: 24, + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const tuple: [number, string]; + tuple.splice(0, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare const a: number[]; + declare const b: number; + + delete [...a, ...a][b]; + `, + errors: [ + { + messageId: 'noArrayDelete', + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const a: number[]; + declare const b: number; + + [...a, ...a].splice(b, 1); + `, + }, + ], + }, + ], + }, + + { + code: noFormat` + declare const a: number[]; + declare const b: number; + + // before expression + delete /** multi + line */ a[(( + // single-line + b /* inline */ /* another-inline */ ) + ) /* another-one */ ] /* before semicolon */; /* after semicolon */ + // after expression + `, + errors: [ + { + messageId: 'noArrayDelete', + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const a: number[]; + declare const b: number; + + // before expression + /** multi + line */ + // single-line + /* inline */ + /* another-inline */ + /* another-one */ + a.splice(b, 1) /* before semicolon */; /* after semicolon */ + // after expression + `, + }, + ], + }, + ], + }, + + { + code: noFormat` + declare const a: number[]; + declare const b: number; + + delete ((a[((b))])); + `, + errors: [ + { + messageId: 'noArrayDelete', + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const a: number[]; + declare const b: number; + + a.splice(b, 1); + `, + }, + ], + }, + ], + }, + + { + code: ` + declare const a: number[]; + declare const b: number; + + delete a[(b + 1) * (b + 2)]; + `, + errors: [ + { + messageId: 'noArrayDelete', + suggestions: [ + { + messageId: 'useSplice', + output: ` + declare const a: number[]; + declare const b: number; + + a.splice((b + 1) * (b + 2), 1); + `, + }, + ], + }, + ], + }, + ], +}); diff --git a/packages/eslint-plugin/tests/schema-snapshots/no-array-delete.shot b/packages/eslint-plugin/tests/schema-snapshots/no-array-delete.shot new file mode 100644 index 000000000000..c8dc106464a0 --- /dev/null +++ b/packages/eslint-plugin/tests/schema-snapshots/no-array-delete.shot @@ -0,0 +1,14 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Rule schemas should be convertible to TS types for documentation purposes no-array-delete 1`] = ` +" +# SCHEMA: + +[] + + +# TYPES: + +/** No options declared */ +type Options = [];" +`; From 2ae54401cbfa4a6ce3d4f7f10fd0bc9eec0cd7ee Mon Sep 17 00:00:00 2001 From: kirkwaiblinger <53019676+kirkwaiblinger@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:09:34 -0700 Subject: [PATCH 060/165] docs: force space after await in no-floating-promises snippet (#8228) force space after await --- packages/eslint-plugin/docs/rules/no-floating-promises.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/no-floating-promises.md b/packages/eslint-plugin/docs/rules/no-floating-promises.md index e137a85aaf97..da46d7f98d18 100644 --- a/packages/eslint-plugin/docs/rules/no-floating-promises.md +++ b/packages/eslint-plugin/docs/rules/no-floating-promises.md @@ -98,8 +98,9 @@ This allows you to skip checking of async IIFEs (Immediately Invoked function Ex Examples of **correct** code for this rule with `{ ignoreIIFE: true }`: + ```ts option='{ "ignoreIIFE": true }' showPlaygroundButton -await(async function () { +await (async function () { await res(1); })(); From 21dbb317f9b2e342ec89349ac30756bc98fc5d9b Mon Sep 17 00:00:00 2001 From: StyleShit <32631382+StyleShit@users.noreply.github.com> Date: Tue, 9 Jan 2024 23:02:47 +0200 Subject: [PATCH 061/165] feat(eslint-plugin): [no-useless-template-literals] add fix suggestions (#8065) * feat(eslint-plugin): [no-useless-template-literals] add fix suggestions * change message * add quasis to cspell * add some test cases * use fix instead of suggestion --- .cspell.json | 1 + .../src/rules/no-useless-template-literals.ts | 55 ++++- .../no-useless-template-literals.test.ts | 202 ++++++++++++++++-- 3 files changed, 244 insertions(+), 14 deletions(-) diff --git a/.cspell.json b/.cspell.json index 6133a8917ab4..c6623037c42c 100644 --- a/.cspell.json +++ b/.cspell.json @@ -107,6 +107,7 @@ "preact", "Premade", "prettier's", + "quasis", "Quickstart", "recurse", "redeclaration", diff --git a/packages/eslint-plugin/src/rules/no-useless-template-literals.ts b/packages/eslint-plugin/src/rules/no-useless-template-literals.ts index 48c714edb90a..d5a8a602b6b4 100644 --- a/packages/eslint-plugin/src/rules/no-useless-template-literals.ts +++ b/packages/eslint-plugin/src/rules/no-useless-template-literals.ts @@ -1,4 +1,4 @@ -import type { TSESTree } from '@typescript-eslint/utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; import * as ts from 'typescript'; @@ -15,7 +15,8 @@ type MessageId = 'noUselessTemplateLiteral'; export default createRule<[], MessageId>({ name: 'no-useless-template-literals', meta: { - type: 'problem', + fixable: 'code', + type: 'suggestion', docs: { description: 'Disallow unnecessary template literals', recommended: 'strict', @@ -68,6 +69,22 @@ export default createRule<[], MessageId>({ context.report({ node: node.expressions[0], messageId: 'noUselessTemplateLiteral', + fix(fixer): TSESLint.RuleFix[] { + const [prevQuasi, nextQuasi] = node.quasis; + + // Remove the quasis and backticks. + return [ + fixer.removeRange([ + prevQuasi.range[1] - 3, + node.expressions[0].range[0], + ]), + + fixer.removeRange([ + node.expressions[0].range[1], + nextQuasi.range[0] + 2, + ]), + ]; + }, }); return; @@ -83,6 +100,40 @@ export default createRule<[], MessageId>({ context.report({ node: expression, messageId: 'noUselessTemplateLiteral', + fix(fixer): TSESLint.RuleFix[] { + const index = node.expressions.indexOf(expression); + const prevQuasi = node.quasis[index]; + const nextQuasi = node.quasis[index + 1]; + + // Remove the quasis' parts that are related to the current expression. + const fixes = [ + fixer.removeRange([ + prevQuasi.range[1] - 2, + expression.range[0], + ]), + + fixer.removeRange([ + expression.range[1], + nextQuasi.range[0] + 1, + ]), + ]; + + // Remove quotes for string literals (i.e. `'a'` will become `a`). + const isStringLiteral = + isUnderlyingTypeString(expression) && + expression.type === AST_NODE_TYPES.Literal; + + if (isStringLiteral) { + const escapedValue = expression.value.replace( + /([`$\\])/g, + '\\$1', + ); + + fixes.push(fixer.replaceText(expression, escapedValue)); + } + + return fixes; + }, }); }); }, diff --git a/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts b/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts index 54ac89c2c797..674b4ccefe77 100644 --- a/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts +++ b/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts @@ -137,6 +137,7 @@ ruleTester.run('no-useless-template-literals', rule, { invalid: [ { code: '`${1}`;', + output: '`1`;', errors: [ { messageId: 'noUselessTemplateLiteral', @@ -146,19 +147,50 @@ ruleTester.run('no-useless-template-literals', rule, { }, ], }, + { - code: '`${1n}`;', + code: noFormat`\`\${ 1 }\`;`, + output: '`1`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + + { + code: noFormat`\`\${ 'a' }\`;`, + output: `'a';`, errors: [ { messageId: 'noUselessTemplateLiteral', - line: 1, - column: 4, - endColumn: 6, }, ], }, + + { + code: noFormat`\`\${ "a" }\`;`, + output: `"a";`, + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + + { + code: noFormat`\`\${ 'a' + 'b' }\`;`, + output: `'a' + 'b';`, + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + { code: '`${true}`;', + output: '`true`;', errors: [ { messageId: 'noUselessTemplateLiteral', @@ -168,8 +200,20 @@ ruleTester.run('no-useless-template-literals', rule, { }, ], }, + + { + code: noFormat`\`\${ true }\`;`, + output: '`true`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + { code: '`${null}`;', + output: '`null`;', errors: [ { messageId: 'noUselessTemplateLiteral', @@ -179,8 +223,20 @@ ruleTester.run('no-useless-template-literals', rule, { }, ], }, + + { + code: noFormat`\`\${ null }\`;`, + output: '`null`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + { code: '`${undefined}`;', + output: '`undefined`;', errors: [ { messageId: 'noUselessTemplateLiteral', @@ -190,8 +246,20 @@ ruleTester.run('no-useless-template-literals', rule, { }, ], }, + { - code: "`${'a'}${'b'}`;", + code: noFormat`\`\${ undefined }\`;`, + output: '`undefined`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + + { + code: "`${'a'} ${'b'}`;", + output: '`a b`;', errors: [ { messageId: 'noUselessTemplateLiteral', @@ -202,8 +270,21 @@ ruleTester.run('no-useless-template-literals', rule, { { messageId: 'noUselessTemplateLiteral', line: 1, - column: 10, - endColumn: 13, + column: 11, + endColumn: 14, + }, + ], + }, + + { + code: noFormat`\`\${ 'a' } \${ 'b' }\`;`, + output: '`a b`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + { + messageId: 'noUselessTemplateLiteral', }, ], }, @@ -213,6 +294,10 @@ ruleTester.run('no-useless-template-literals', rule, { declare const b: 'b'; \`a\${b}\${'c'}\`; `, + output: ` + declare const b: 'b'; + \`a\${b}c\`; + `, errors: [ { messageId: 'noUselessTemplateLiteral', @@ -225,6 +310,7 @@ ruleTester.run('no-useless-template-literals', rule, { { code: "`a${'b'}`;", + output: '`ab`;', errors: [ { messageId: 'noUselessTemplateLiteral', @@ -236,13 +322,14 @@ ruleTester.run('no-useless-template-literals', rule, { }, { - code: "`${'1 + 1 = '}${2}`;", + code: "`${'1 + 1 ='} ${2}`;", + output: '`1 + 1 = 2`;', errors: [ { messageId: 'noUselessTemplateLiteral', line: 1, column: 4, - endColumn: 14, + endColumn: 13, }, { messageId: 'noUselessTemplateLiteral', @@ -254,7 +341,8 @@ ruleTester.run('no-useless-template-literals', rule, { }, { - code: "`${'a'}${true}`;", + code: "`${'a'} ${true}`;", + output: '`a true`;', errors: [ { messageId: 'noUselessTemplateLiteral', @@ -265,8 +353,8 @@ ruleTester.run('no-useless-template-literals', rule, { { messageId: 'noUselessTemplateLiteral', line: 1, - column: 10, - endColumn: 14, + column: 11, + endColumn: 15, }, ], }, @@ -276,6 +364,10 @@ ruleTester.run('no-useless-template-literals', rule, { declare const string: 'a'; \`\${string}\`; `, + output: ` + declare const string: 'a'; + string; + `, errors: [ { messageId: 'noUselessTemplateLiteral', @@ -286,8 +378,25 @@ ruleTester.run('no-useless-template-literals', rule, { ], }, + { + code: noFormat` + declare const string: 'a'; + \`\${ string }\`; + `, + output: ` + declare const string: 'a'; + string; + `, + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + { code: "`${String(Symbol.for('test'))}`;", + output: "String(Symbol.for('test'));", errors: [ { messageId: 'noUselessTemplateLiteral', @@ -303,6 +412,10 @@ ruleTester.run('no-useless-template-literals', rule, { declare const intersection: string & { _brand: 'test-brand' }; \`\${intersection}\`; `, + output: ` + declare const intersection: string & { _brand: 'test-brand' }; + intersection; + `, errors: [ { messageId: 'noUselessTemplateLiteral', @@ -319,6 +432,11 @@ ruleTester.run('no-useless-template-literals', rule, { \`\${arg}\`; } `, + output: ` + function func(arg: T) { + arg; + } + `, errors: [ { messageId: 'noUselessTemplateLiteral', @@ -328,5 +446,65 @@ ruleTester.run('no-useless-template-literals', rule, { }, ], }, + + { + code: "`${'`'}`;", + output: "'`';", + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + + { + code: "`back${'`'}tick`;", + output: '`back\\`tick`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + + { + code: "`dollar${'${`this is test`}'}sign`;", + output: '`dollar\\${\\`this is test\\`}sign`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + + { + code: '`complex${\'`${"`${test}`"}`\'}case`;', + output: '`complex\\`\\${"\\`\\${test}\\`"}\\`case`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + + { + code: "`some ${'\\\\${test}'} string`;", + output: '`some \\\\\\${test} string`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, + + { + code: "`some ${'\\\\`'} string`;", + output: '`some \\\\\\` string`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + }, + ], + }, ], }); From 4cbb51077a3ba527adfe15305b691c8dfa173fd0 Mon Sep 17 00:00:00 2001 From: Flo Edelmann Date: Thu, 11 Jan 2024 18:56:27 +0100 Subject: [PATCH 062/165] docs: link version in website header to GitHub release (#8236) --- packages/website/docusaurusConfig.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/website/docusaurusConfig.ts b/packages/website/docusaurusConfig.ts index 625e6008a08f..cc283cfc2993 100644 --- a/packages/website/docusaurusConfig.ts +++ b/packages/website/docusaurusConfig.ts @@ -91,8 +91,8 @@ const themeConfig: AlgoliaThemeConfig & ThemeCommonConfig = { }, { position: 'right', - value: `

`, - type: 'html', + href: `https://github.com/typescript-eslint/typescript-eslint/releases/tag/v${version}`, + label: `v${version}`, }, { to: 'play', From cfaf2a8c8a66122bc4c60dceebde6fdb3669840e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Thu, 11 Jan 2024 19:40:57 -0500 Subject: [PATCH 063/165] fix(typescript-estree): add JSDocParsingMode enum merge for typescript/lib/tsserverlibrary (#8193) --- packages/typescript-estree/src/parseSettings/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/typescript-estree/src/parseSettings/index.ts b/packages/typescript-estree/src/parseSettings/index.ts index 6aca7a863aae..1df275901066 100644 --- a/packages/typescript-estree/src/parseSettings/index.ts +++ b/packages/typescript-estree/src/parseSettings/index.ts @@ -12,6 +12,11 @@ declare module 'typescript' { // Added in TypeScript 5.3 enum JSDocParsingMode {} } +// https://github.com/typescript-eslint/typescript-eslint/issues/8172 +declare module 'typescript/lib/tsserverlibrary' { + // Added in TypeScript 5.3 + enum JSDocParsingMode {} +} /** * Internal settings used by the parser to run on a file. From a305a8278e9e4dab6149217d46a881b9cc9282fd Mon Sep 17 00:00:00 2001 From: LJX <11309921+lvjiaxuan@users.noreply.github.com> Date: Fri, 12 Jan 2024 15:40:18 +0800 Subject: [PATCH 064/165] fix(eslint-plugin): [no-unnecessary-type-assertion] detect unnecessary non-null-assertion on a call expression (#8143) * feat(eslint-plugin): [no-unnecessary-type-assertion] add `Identifier` check * feat(eslint-plugin): [no-unnecessary-type-assertion] update fixer for `CallExpression` * feat(eslint-plugin): [no-unnecessary-type-assertion] add test case * feat(eslint-plugin): [no-unnecessary-type-assertion] fit more cases * feat(eslint-plugin): [no-unnecessary-type-assertion] add valid test cases * fix: fix a gap and add tests * fix: typo --- .../src/rules/no-unnecessary-condition.ts | 2 +- .../rules/no-unnecessary-type-assertion.ts | 15 +- .../no-unnecessary-type-assertion.test.ts | 137 ++++++++++++++++++ 3 files changed, 147 insertions(+), 7 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index 12a42398b3ee..69dd6174fec2 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -436,7 +436,7 @@ export default createRule({ function checkCallExpression(node: TSESTree.CallExpression): void { // If this is something like arr.filter(x => /*condition*/), check `condition` if (isArrayPredicateFunction(node) && node.arguments.length) { - const callback = node.arguments[0]!; + const callback = node.arguments[0]; // Inline defined functions if ( callback.type === AST_NODE_TYPES.ArrowFunctionExpression || diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts index 96de86efe116..58ef344bf515 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts @@ -169,7 +169,10 @@ export default createRule({ const type = getConstrainedTypeAtLocation(services, node.expression); if (!isNullableType(type)) { - if (isPossiblyUsedBeforeAssigned(node.expression)) { + if ( + node.expression.type === AST_NODE_TYPES.Identifier && + isPossiblyUsedBeforeAssigned(node.expression) + ) { return; } @@ -177,10 +180,7 @@ export default createRule({ node, messageId: 'unnecessaryAssertion', fix(fixer) { - return fixer.removeRange([ - node.expression.range[1], - node.range[1], - ]); + return fixer.removeRange([node.range[1] - 1, node.range[1]]); }, }); } else { @@ -274,7 +274,10 @@ export default createRule({ : null; } return fixer.removeRange([ - node.expression.range[1] + 1, + node.expression.range[1] + + (node.expression.type === AST_NODE_TYPES.CallExpression + ? 0 + : 1), node.range[1], ]); }, diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts index 8cf362938bab..010cf2ace83a 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts @@ -213,6 +213,30 @@ let values: number[] = []; value = values.pop()!; `, + ` +declare function foo(): number | undefined; +const a = foo()!; + `, + ` +declare function foo(): number | undefined; +const a = foo() as number; + `, + ` +declare function foo(): number | undefined; +const a = foo(); + `, + ` +declare const arr: (object | undefined)[]; +const item = arr[0]!; + `, + ` +declare const arr: (object | undefined)[]; +const item = arr[0] as object; + `, + ` +declare const arr: (object | undefined)[]; +const item = arr[0]; + `, ], invalid: [ @@ -518,5 +542,118 @@ y = 0; }, ], }, + { + code: ` +declare function foo(): number; +const a = foo()!; + `, + output: ` +declare function foo(): number; +const a = foo(); + `, + errors: [ + { + messageId: 'unnecessaryAssertion', + line: 3, + column: 11, + endColumn: 17, + }, + ], + }, + { + code: ` +const b = new Date()!; + `, + output: ` +const b = new Date(); + `, + errors: [ + { + messageId: 'unnecessaryAssertion', + line: 2, + }, + ], + }, + { + code: ` +const b = (1 + 1)!; + `, + output: ` +const b = (1 + 1); + `, + errors: [ + { + messageId: 'unnecessaryAssertion', + line: 2, + column: 11, + endColumn: 19, + }, + ], + }, + { + code: ` +declare function foo(): number; +const a = foo() as number; + `, + output: ` +declare function foo(): number; +const a = foo(); + `, + errors: [ + { + messageId: 'unnecessaryAssertion', + line: 3, + column: 11, + }, + ], + }, + { + code: ` +declare function foo(): number; +const a = foo(); + `, + output: ` +declare function foo(): number; +const a = foo(); + `, + errors: [ + { + messageId: 'unnecessaryAssertion', + line: 3, + }, + ], + }, + { + code: ` +type RT = { log: () => void }; +declare function foo(): RT; +(foo() as RT).log; + `, + output: ` +type RT = { log: () => void }; +declare function foo(): RT; +(foo()).log; + `, + errors: [ + { + messageId: 'unnecessaryAssertion', + }, + ], + }, + { + code: ` +declare const arr: object[]; +const item = arr[0]!; + `, + output: ` +declare const arr: object[]; +const item = arr[0]; + `, + errors: [ + { + messageId: 'unnecessaryAssertion', + }, + ], + }, ], }); From 5f327dc10cb56929e6d13db0449664c6715e0778 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 12 Jan 2024 19:26:37 +0800 Subject: [PATCH 065/165] fix(typescript-estree): disallow `using` as the variable keyword for `for..in` loops (#7649) Co-authored-by: Brad Zacher --- .../fixtures/_error_/using-initializer/fixture.ts | 1 + .../using-initializer/snapshots/1-TSESTree-Error.shot | 7 +++++++ .../using-initializer/snapshots/2-Babel-Error.shot | 3 +++ .../snapshots/3-Alignment-Error.shot | 3 +++ packages/typescript-estree/src/convert.ts | 11 +++++++++++ 5 files changed, 25 insertions(+) create mode 100644 packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/fixture.ts create mode 100644 packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/1-TSESTree-Error.shot create mode 100644 packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/2-Babel-Error.shot create mode 100644 packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/3-Alignment-Error.shot diff --git a/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/fixture.ts b/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/fixture.ts new file mode 100644 index 000000000000..b65a9983c6cd --- /dev/null +++ b/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/fixture.ts @@ -0,0 +1 @@ +for(using foo in {}); \ No newline at end of file diff --git a/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/1-TSESTree-Error.shot b/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/1-TSESTree-Error.shot new file mode 100644 index 000000000000..f914c11ac282 --- /dev/null +++ b/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/1-TSESTree-Error.shot @@ -0,0 +1,7 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures statement ForInStatement _error_ using-initializer TSESTree - Error 1`] = ` +"TSError +> 1 | for(using foo in {}); + | ^^^^^^^^^ The left-hand side of a 'for...in' statement cannot be a 'using' declaration." +`; diff --git a/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/2-Babel-Error.shot b/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/2-Babel-Error.shot new file mode 100644 index 000000000000..f1c91950c6ec --- /dev/null +++ b/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/2-Babel-Error.shot @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures statement ForInStatement _error_ using-initializer Babel - Error 1`] = `[SyntaxError: For-in loop may not start with 'using' declaration. (1:4)]`; diff --git a/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/3-Alignment-Error.shot b/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/3-Alignment-Error.shot new file mode 100644 index 000000000000..3987fd760265 --- /dev/null +++ b/packages/ast-spec/src/statement/ForInStatement/fixtures/_error_/using-initializer/snapshots/3-Alignment-Error.shot @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures statement ForInStatement _error_ using-initializer Error Alignment 1`] = `"Both errored"`; diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 7ebd5cc9e1cb..2fb094c1b589 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -933,6 +933,7 @@ export class Converter { }); case SyntaxKind.ForInStatement: + this.#checkForStatementDeclaration(node.initializer); return this.createNode(node, { type: AST_NODE_TYPES.ForInStatement, left: this.convertPattern(node.initializer), @@ -3510,4 +3511,14 @@ export class Converter { throw createError(message, this.ast, start, end); } + #checkForStatementDeclaration(initializer: ts.ForInitializer): void { + if (ts.isVariableDeclarationList(initializer)) { + if ((initializer.flags & ts.NodeFlags.Using) !== 0) { + this.#throwError( + initializer, + "The left-hand side of a 'for...in' statement cannot be a 'using' declaration.", + ); + } + } + } } From 8e4f4847a15c5e6dc7b9c5a30ac16ac7c9f6c60a Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Fri, 12 Jan 2024 06:26:52 -0500 Subject: [PATCH 066/165] fix(eslint-plugin): [no-unnecesary-type-assertion] treat unknown/any as nullable (#8089) Co-authored-by: Brad Zacher --- .../src/rules/no-unnecessary-condition.ts | 11 +++----- .../src/rules/prefer-nullish-coalescing.ts | 3 +-- .../no-unnecessary-type-assertion.test.ts | 5 ++++ packages/type-utils/src/predicates.ts | 26 +++++++++---------- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index 69dd6174fec2..0a31535797d7 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -530,7 +530,7 @@ export default createRule({ propertyType.value.toString(), ); if (propType) { - return isNullableType(propType, { allowUndefined: true }); + return isNullableType(propType); } } const typeName = getTypeName(checker, propertyType); @@ -568,14 +568,12 @@ export default createRule({ ); if (propType) { - return isNullableType(propType, { allowUndefined: true }); + return isNullableType(propType); } return !!checker.getIndexInfoOfType(type, ts.IndexKind.String); }); - return ( - !isOwnNullable && isNullableType(prevType, { allowUndefined: true }) - ); + return !isOwnNullable && isNullableType(prevType); } return false; } @@ -612,8 +610,7 @@ export default createRule({ const possiblyVoid = isTypeFlagSet(type, ts.TypeFlags.Void); return ( isTypeFlagSet(type, ts.TypeFlags.Any | ts.TypeFlags.Unknown) || - (isOwnNullable && - (isNullableType(type, { allowUndefined: true }) || possiblyVoid)) + (isOwnNullable && (isNullableType(type) || possiblyVoid)) ); } diff --git a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts index be498cb94ad0..c688d75d2771 100644 --- a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts +++ b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts @@ -309,8 +309,7 @@ export default createRule({ ): void { const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node); const type = checker.getTypeAtLocation(tsNode.left); - const isNullish = isNullableType(type, { allowUndefined: true }); - if (!isNullish) { + if (!isNullableType(type)) { return; } diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts index 010cf2ace83a..2c3cc3599e83 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts @@ -48,6 +48,11 @@ const foo = { 0: 'hello', 5: 'hello' } as PossibleTuple; ` let bar: number | undefined = x; let foo: number = bar!; + `, + ` +declare const a: { data?: unknown }; + +const x = a.data!; `, { code: ` diff --git a/packages/type-utils/src/predicates.ts b/packages/type-utils/src/predicates.ts index 37658e31b716..26ef59355781 100644 --- a/packages/type-utils/src/predicates.ts +++ b/packages/type-utils/src/predicates.ts @@ -2,15 +2,18 @@ import debug from 'debug'; import * as tsutils from 'ts-api-utils'; import * as ts from 'typescript'; -import { getTypeFlags, isTypeFlagSet } from './typeFlagUtils'; +import { isTypeFlagSet } from './typeFlagUtils'; const log = debug('typescript-eslint:eslint-plugin:utils:types'); export interface IsNullableTypeOptions { /** - * Whether the type is a receiving type (i.e. the type of a called function's parameter). + * @deprecated - this flag no longer does anything and will be removed in the next major */ isReceiver?: boolean; + /** + * @deprecated - this flag no longer does anything and will be removed in the next major + */ allowUndefined?: boolean; } @@ -19,18 +22,15 @@ export interface IsNullableTypeOptions { */ export function isNullableType( type: ts.Type, - { isReceiver = false, allowUndefined = true }: IsNullableTypeOptions = {}, + _deprecated?: IsNullableTypeOptions, ): boolean { - const flags = getTypeFlags(type); - - if (isReceiver && flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown)) { - return true; - } - - if (allowUndefined) { - return (flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)) !== 0; - } - return (flags & ts.TypeFlags.Null) !== 0; + return isTypeFlagSet( + type, + ts.TypeFlags.Any | + ts.TypeFlags.Unknown | + ts.TypeFlags.Null | + ts.TypeFlags.Undefined, + ); } /** From 9ec35a232848ab7db2ff0931ddf96533b702fa85 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 13 Jan 2024 14:23:41 +1030 Subject: [PATCH 067/165] fix(typescript-estree): fix incorrect backwards-compat augmentation in TS 5.3 (#8181) --- packages/typescript-estree/src/parser.ts | 2 +- packages/typescript-estree/src/ts-estree/ts-nodes.ts | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 08c29892e220..ffa0c4212295 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -244,7 +244,7 @@ function parseAndGenerateServices( options.filePath && parseAndGenerateServicesCalls[options.filePath] > 1 ? createIsolatedProgram(parseSettings) - : getProgramAndAST(parseSettings, hasFullTypeInformation)!; + : getProgramAndAST(parseSettings, hasFullTypeInformation); /** * Convert the TypeScript AST to an ESTree-compatible one, and optionally preserve diff --git a/packages/typescript-estree/src/ts-estree/ts-nodes.ts b/packages/typescript-estree/src/ts-estree/ts-nodes.ts index 5bf6af81a9f5..2a07ee0e7eac 100644 --- a/packages/typescript-estree/src/ts-estree/ts-nodes.ts +++ b/packages/typescript-estree/src/ts-estree/ts-nodes.ts @@ -2,12 +2,11 @@ import type * as ts from 'typescript'; // Workaround to support new TS version features for consumers on old TS versions // Eg: https://github.com/typescript-eslint/typescript-eslint/issues/2388, https://github.com/typescript-eslint/typescript-eslint/issues/2784 -/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error, @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-empty-interface */ declare module 'typescript' { - /** @ts-ignore - added in TS 4.5, deprecated and converted to a type-alias in TS 5.3 */ - export interface AssertClause extends ts.Node {} - /** @ts-ignore - added in TS 4.5, deprecated and converted to a type-alias in TS 5.3 */ - export interface AssertEntry extends ts.Node {} + // added in TS 4.5, deprecated in TS 5.3 + export interface AssertClause extends ts.ImportAttributes {} + export interface AssertEntry extends ts.ImportAttribute {} // added in TS 4.9 export interface SatisfiesExpression extends ts.Node {} // added in TS 5.1 @@ -16,7 +15,7 @@ declare module 'typescript' { export interface ImportAttribute extends ts.Node {} export interface ImportAttributes extends ts.Node {} } -/* eslint-enable @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error, @typescript-eslint/no-empty-interface */ +/* eslint-enable @typescript-eslint/no-empty-interface */ export type TSToken = ts.Token; From 77b36ea6935e9198725bc6a743613b213370e5e1 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 14 Jan 2024 01:20:27 +0400 Subject: [PATCH 068/165] chore: make lint job use eslint-plugin outputs as inputs (#8245) --- nx.json | 7 ++++++- .../tools/integration-test-base.ts | 2 ++ packages/types/package.json | 18 +++++------------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/nx.json b/nx.json index 552b09332128..d85a0833983e 100644 --- a/nx.json +++ b/nx.json @@ -38,11 +38,16 @@ "cache": true }, "lint": { + "dependsOn": ["eslint-plugin:build"], "inputs": [ "default", "{workspaceRoot}/.eslintrc.js", "{workspaceRoot}/yarn.lock", - "{workspaceRoot}/.eslintignore" + "{workspaceRoot}/.eslintignore", + { + "dependentTasksOutputFiles": "**/*.js", + "transitive": false + } ], "cache": true }, diff --git a/packages/integration-tests/tools/integration-test-base.ts b/packages/integration-tests/tools/integration-test-base.ts index eb35212ee775..833ec45182a0 100644 --- a/packages/integration-tests/tools/integration-test-base.ts +++ b/packages/integration-tests/tools/integration-test-base.ts @@ -94,6 +94,8 @@ export function integrationTest(testFilename: string, filesGlob: string): void { if (stderr.length > 0) { console.error(stderr); } + // childProcess.ExecFileException is an extension of Error + // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors reject(err); } else { resolve(); diff --git a/packages/types/package.json b/packages/types/package.json index 063eb0e13657..7fa60e72ab48 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -49,25 +49,17 @@ "targets": { "copy-ast-spec": { "dependsOn": [ - { - "target": "build", - "projects": "dependencies" - } + "^build" ], "outputs": [ "{projectRoot}/src/generated" - ] + ], + "cache": true }, "build": { "dependsOn": [ - { - "target": "build", - "projects": "dependencies" - }, - { - "target": "copy-ast-spec", - "projects": "self" - } + "^build", + "copy-ast-spec" ] } } From 62cc2aa1f9d34f4d5bb9b8f36c9c9c391e0e353f Mon Sep 17 00:00:00 2001 From: "typescript-eslint[bot]" Date: Mon, 15 Jan 2024 17:15:19 +0000 Subject: [PATCH 069/165] chore(release): publish 6.19.0 --- CHANGELOG.md | 29 +++++ packages/ast-spec/CHANGELOG.md | 20 +++ packages/ast-spec/package.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 6 + packages/eslint-plugin-internal/package.json | 10 +- packages/eslint-plugin-tslint/CHANGELOG.md | 6 + packages/eslint-plugin-tslint/package.json | 6 +- packages/eslint-plugin/CHANGELOG.md | 31 +++++ packages/eslint-plugin/package.json | 14 +-- packages/integration-tests/CHANGELOG.md | 6 + packages/integration-tests/package.json | 2 +- packages/parser/CHANGELOG.md | 6 + packages/parser/package.json | 10 +- packages/repo-tools/CHANGELOG.md | 6 + packages/repo-tools/package.json | 2 +- .../CHANGELOG.md | 6 + .../package.json | 6 +- packages/rule-tester/CHANGELOG.md | 6 + packages/rule-tester/package.json | 8 +- packages/scope-manager/CHANGELOG.md | 6 + packages/scope-manager/package.json | 8 +- packages/type-utils/CHANGELOG.md | 25 ++++ packages/type-utils/package.json | 8 +- packages/types/CHANGELOG.md | 6 + packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 24 ++++ packages/typescript-estree/package.json | 6 +- packages/utils/CHANGELOG.md | 6 + packages/utils/package.json | 10 +- packages/visitor-keys/CHANGELOG.md | 6 + packages/visitor-keys/package.json | 4 +- packages/website-eslint/CHANGELOG.md | 6 + packages/website-eslint/package.json | 16 +-- packages/website/CHANGELOG.md | 6 + packages/website/package.json | 12 +- yarn.lock | 114 +++++++++--------- 36 files changed, 327 insertions(+), 120 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 974127de56a7..af44283abf4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,32 @@ +## 6.19.0 (2024-01-15) + + +### 🚀 Features + +- **eslint-plugin:** [prefer-promise-reject-errors] add rule ([#8011](https://github.com/typescript-eslint/typescript-eslint/pull/8011)) +- **eslint-plugin:** [no-array-delete] add new rule ([#8067](https://github.com/typescript-eslint/typescript-eslint/pull/8067)) +- **eslint-plugin:** [no-useless-template-literals] add fix suggestions ([#8065](https://github.com/typescript-eslint/typescript-eslint/pull/8065)) + +### 🩹 Fixes + +- **eslint-plugin:** [no-unnecessary-type-assertion] detect unnecessary non-null-assertion on a call expression ([#8143](https://github.com/typescript-eslint/typescript-eslint/pull/8143)) +- **eslint-plugin:** [no-unnecesary-type-assertion] treat unknown/any as nullable ([#8089](https://github.com/typescript-eslint/typescript-eslint/pull/8089)) +- **typescript-estree:** add JSDocParsingMode enum merge for typescript/lib/tsserverlibrary ([#8193](https://github.com/typescript-eslint/typescript-eslint/pull/8193)) +- **typescript-estree:** disallow `using` as the variable keyword for `for..in` loops ([#7649](https://github.com/typescript-eslint/typescript-eslint/pull/7649)) +- **typescript-estree:** fix incorrect backwards-compat augmentation in TS 5.3 ([#8181](https://github.com/typescript-eslint/typescript-eslint/pull/8181)) + +### ❤️ Thank You + +- auvred @auvred +- Brad Zacher @bradzacher +- Josh Goldberg ✨ +- Joshua Chen +- LJX @lvjiaxuan +- Steven @Solo-steven +- StyleShit @StyleShit + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 9608d2aefe36..47d00a853303 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -1,3 +1,23 @@ +## 6.19.0 (2024-01-15) + + +### 🩹 Fixes + +- **typescript-estree:** disallow `using` as the variable keyword for `for..in` loops + + +### ❤️ Thank You + +- auvred +- Brad Zacher +- Josh Goldberg ✨ +- Joshua Chen +- LJX +- Steven +- StyleShit + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 3e396707de5f..1132cccd79de 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "6.18.1", + "version": "6.19.0", "description": "Complete specification for the TypeScript-ESTree AST", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index b49de9be6a19..3633512769c8 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index e0299ce75772..33a7edcb37f6 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "6.18.1", + "version": "6.19.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,10 +14,10 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/rule-tester": "6.18.1", - "@typescript-eslint/scope-manager": "6.18.1", - "@typescript-eslint/type-utils": "6.18.1", - "@typescript-eslint/utils": "6.18.1", + "@typescript-eslint/rule-tester": "6.19.0", + "@typescript-eslint/scope-manager": "6.19.0", + "@typescript-eslint/type-utils": "6.19.0", + "@typescript-eslint/utils": "6.19.0", "prettier": "^3.0.3" }, "devDependencies": { diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index c98f9a8d0e66..44fcbf80c54b 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for eslint-plugin-tslint to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for eslint-plugin-tslint to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 36ba58ba2895..ca06480892b5 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "6.18.1", + "version": "6.19.0", "main": "dist/index.js", "typings": "src/index.ts", "description": "ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint", @@ -46,7 +46,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "6.18.1" + "@typescript-eslint/utils": "6.19.0" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0", @@ -55,7 +55,7 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "6.18.1", + "@typescript-eslint/parser": "6.19.0", "jest": "29.7.0", "prettier": "^3.0.3", "rimraf": "*" diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 88fb389496c9..64a4e1dcd452 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,3 +1,34 @@ +## 6.19.0 (2024-01-15) + + +### 🚀 Features + +- **eslint-plugin:** [prefer-promise-reject-errors] add rule + +- **eslint-plugin:** [no-array-delete] add new rule + +- **eslint-plugin:** [no-useless-template-literals] add fix suggestions + + +### 🩹 Fixes + +- **eslint-plugin:** [no-unnecessary-type-assertion] detect unnecessary non-null-assertion on a call expression + +- **eslint-plugin:** [no-unnecesary-type-assertion] treat unknown/any as nullable + + +### ❤️ Thank You + +- auvred +- Brad Zacher +- Josh Goldberg ✨ +- Joshua Chen +- LJX +- Steven +- StyleShit + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 07733150bbdf..2066c7e99c29 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "6.18.1", + "version": "6.19.0", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -57,10 +57,10 @@ }, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.18.1", - "@typescript-eslint/type-utils": "6.18.1", - "@typescript-eslint/utils": "6.18.1", - "@typescript-eslint/visitor-keys": "6.18.1", + "@typescript-eslint/scope-manager": "6.19.0", + "@typescript-eslint/type-utils": "6.19.0", + "@typescript-eslint/utils": "6.19.0", + "@typescript-eslint/visitor-keys": "6.19.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -73,8 +73,8 @@ "@types/debug": "*", "@types/marked": "*", "@types/natural-compare": "*", - "@typescript-eslint/rule-schema-to-typescript-types": "6.18.1", - "@typescript-eslint/rule-tester": "6.18.1", + "@typescript-eslint/rule-schema-to-typescript-types": "6.19.0", + "@typescript-eslint/rule-tester": "6.19.0", "ajv": "^6.12.6", "chalk": "^5.3.0", "cross-fetch": "*", diff --git a/packages/integration-tests/CHANGELOG.md b/packages/integration-tests/CHANGELOG.md index 01956c239599..d254a11713de 100644 --- a/packages/integration-tests/CHANGELOG.md +++ b/packages/integration-tests/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for integration-tests to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for integration-tests to align it with other projects, there were no code changes. diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index d917a1b7d0c5..cc57c27bd0c6 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/integration-tests", - "version": "6.18.1", + "version": "6.19.0", "private": true, "scripts": { "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 49608f459c04..e5fbedc0de30 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for parser to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for parser to align it with other projects, there were no code changes. diff --git a/packages/parser/package.json b/packages/parser/package.json index 48005cd3604d..3f314a9c0a3f 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "6.18.1", + "version": "6.19.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "files": [ "dist", @@ -51,10 +51,10 @@ "eslint": "^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "6.18.1", - "@typescript-eslint/types": "6.18.1", - "@typescript-eslint/typescript-estree": "6.18.1", - "@typescript-eslint/visitor-keys": "6.18.1", + "@typescript-eslint/scope-manager": "6.19.0", + "@typescript-eslint/types": "6.19.0", + "@typescript-eslint/typescript-estree": "6.19.0", + "@typescript-eslint/visitor-keys": "6.19.0", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index d8f38af87fd4..a3a213849d57 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for repo-tools to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for repo-tools to align it with other projects, there were no code changes. diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index 593a072fbb2c..527094065401 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/repo-tools", - "version": "6.18.1", + "version": "6.19.0", "private": true, "scripts": { "//": "NOTE: intentionally no build step in this package", diff --git a/packages/rule-schema-to-typescript-types/CHANGELOG.md b/packages/rule-schema-to-typescript-types/CHANGELOG.md index 7c442df6eefd..663193236149 100644 --- a/packages/rule-schema-to-typescript-types/CHANGELOG.md +++ b/packages/rule-schema-to-typescript-types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index bf42b1752a85..2004f67e90de 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-schema-to-typescript-types", - "version": "6.18.1", + "version": "6.19.0", "private": true, "type": "commonjs", "exports": { @@ -34,8 +34,8 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/type-utils": "6.18.1", - "@typescript-eslint/utils": "6.18.1", + "@typescript-eslint/type-utils": "6.19.0", + "@typescript-eslint/utils": "6.19.0", "natural-compare": "^1.4.0", "prettier": "^3.0.3" }, diff --git a/packages/rule-tester/CHANGELOG.md b/packages/rule-tester/CHANGELOG.md index 83ba6ce3089e..2c5785181b72 100644 --- a/packages/rule-tester/CHANGELOG.md +++ b/packages/rule-tester/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for rule-tester to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for rule-tester to align it with other projects, there were no code changes. diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index f9f2ba2ffdb3..fc613092dbd2 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-tester", - "version": "6.18.1", + "version": "6.19.0", "description": "Tooling to test ESLint rules", "files": [ "dist", @@ -47,8 +47,8 @@ }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { - "@typescript-eslint/typescript-estree": "6.18.1", - "@typescript-eslint/utils": "6.18.1", + "@typescript-eslint/typescript-estree": "6.19.0", + "@typescript-eslint/utils": "6.19.0", "ajv": "^6.10.0", "lodash.merge": "4.6.2", "semver": "^7.5.4" @@ -59,7 +59,7 @@ }, "devDependencies": { "@types/lodash.merge": "4.6.9", - "@typescript-eslint/parser": "6.18.1", + "@typescript-eslint/parser": "6.19.0", "chai": "^4.3.7", "mocha": "^10.0.0", "sinon": "^16.0.0", diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 894664c687c0..4cf6f4348675 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for scope-manager to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for scope-manager to align it with other projects, there were no code changes. diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index edd3869831f6..d80e065def42 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "6.18.1", + "version": "6.19.0", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -44,13 +44,13 @@ "typecheck": "npx nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "6.18.1", - "@typescript-eslint/visitor-keys": "6.18.1" + "@typescript-eslint/types": "6.19.0", + "@typescript-eslint/visitor-keys": "6.19.0" }, "devDependencies": { "@prettier/sync": "*", "@types/glob": "*", - "@typescript-eslint/typescript-estree": "6.18.1", + "@typescript-eslint/typescript-estree": "6.19.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index 0f5e135859a1..f90bb7b61fc6 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -1,3 +1,28 @@ +## 6.19.0 (2024-01-15) + + +### 🚀 Features + +- **eslint-plugin:** [prefer-promise-reject-errors] add rule + + +### 🩹 Fixes + +- **eslint-plugin:** [no-unnecesary-type-assertion] treat unknown/any as nullable + + +### ❤️ Thank You + +- auvred +- Brad Zacher +- Josh Goldberg ✨ +- Joshua Chen +- LJX +- Steven +- StyleShit + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for type-utils to align it with other projects, there were no code changes. diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 6548eeb9c8a7..d3635aabf5d6 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "6.18.1", + "version": "6.19.0", "description": "Type utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -45,13 +45,13 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "6.18.1", - "@typescript-eslint/utils": "6.18.1", + "@typescript-eslint/typescript-estree": "6.19.0", + "@typescript-eslint/utils": "6.19.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "devDependencies": { - "@typescript-eslint/parser": "6.18.1", + "@typescript-eslint/parser": "6.19.0", "ajv": "^6.10.0", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 37f72e1df92d..ee88f19fed34 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for types to align it with other projects, there were no code changes. diff --git a/packages/types/package.json b/packages/types/package.json index 7fa60e72ab48..e6484f0156ef 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "6.18.1", + "version": "6.19.0", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 059d6a3f5b75..f01e5284b199 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -1,3 +1,27 @@ +## 6.19.0 (2024-01-15) + + +### 🩹 Fixes + +- **typescript-estree:** add JSDocParsingMode enum merge for typescript/lib/tsserverlibrary + +- **typescript-estree:** disallow `using` as the variable keyword for `for..in` loops + +- **typescript-estree:** fix incorrect backwards-compat augmentation in TS 5.3 + + +### ❤️ Thank You + +- auvred +- Brad Zacher +- Josh Goldberg ✨ +- Joshua Chen +- LJX +- Steven +- StyleShit + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 1c476dcaa0cf..ffa4a4049379 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "6.18.1", + "version": "6.19.0", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "files": [ "dist", @@ -52,8 +52,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.18.1", - "@typescript-eslint/visitor-keys": "6.18.1", + "@typescript-eslint/types": "6.19.0", + "@typescript-eslint/visitor-keys": "6.19.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 52ae999b587d..d47292d16a8a 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for utils to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) diff --git a/packages/utils/package.json b/packages/utils/package.json index 7364a438ba3a..e6fd7c529377 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "6.18.1", + "version": "6.19.0", "description": "Utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -68,16 +68,16 @@ "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.18.1", - "@typescript-eslint/types": "6.18.1", - "@typescript-eslint/typescript-estree": "6.18.1", + "@typescript-eslint/scope-manager": "6.19.0", + "@typescript-eslint/types": "6.19.0", + "@typescript-eslint/typescript-estree": "6.19.0", "semver": "^7.5.4" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { - "@typescript-eslint/parser": "6.18.1", + "@typescript-eslint/parser": "6.19.0", "downlevel-dts": "*", "jest": "29.7.0", "prettier": "^3.0.3", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 00bf29bb06c1..720a04734ade 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for visitor-keys to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index db2f5a50d126..b6444d5107e6 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "6.18.1", + "version": "6.19.0", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "files": [ "dist", @@ -45,7 +45,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/types": "6.19.0", "eslint-visitor-keys": "^3.4.1" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index 1009bd6da543..eea73823bbc9 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for website-eslint to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for website-eslint to align it with other projects, there were no code changes. diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index f0049f1b9905..71b4e13a5fbc 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "6.18.1", + "version": "6.19.0", "private": true, "description": "ESLint which works in browsers.", "files": [ @@ -23,16 +23,16 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.18.1", - "@typescript-eslint/utils": "6.18.1" + "@typescript-eslint/types": "6.19.0", + "@typescript-eslint/utils": "6.19.0" }, "devDependencies": { "@eslint/js": "8.56.0", - "@typescript-eslint/eslint-plugin": "6.18.1", - "@typescript-eslint/parser": "6.18.1", - "@typescript-eslint/scope-manager": "6.18.1", - "@typescript-eslint/typescript-estree": "6.18.1", - "@typescript-eslint/visitor-keys": "6.18.1", + "@typescript-eslint/eslint-plugin": "6.19.0", + "@typescript-eslint/parser": "6.19.0", + "@typescript-eslint/scope-manager": "6.19.0", + "@typescript-eslint/typescript-estree": "6.19.0", + "@typescript-eslint/visitor-keys": "6.19.0", "esbuild": "~0.19.0", "eslint": "*", "esquery": "*", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index 71f7e0e50972..c647d2d15e38 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.0 (2024-01-15) + +This was a version bump only for website to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.18.1 (2024-01-08) This was a version bump only for website to align it with other projects, there were no code changes. diff --git a/packages/website/package.json b/packages/website/package.json index bd4b65fe476a..cf6ca13d4a4e 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "6.18.1", + "version": "6.19.0", "private": true, "scripts": { "build": "docusaurus build", @@ -24,8 +24,8 @@ "@docusaurus/theme-common": "~2.4.1", "@mdx-js/react": "1.6.22", "@prettier/sync": "*", - "@typescript-eslint/parser": "6.18.1", - "@typescript-eslint/website-eslint": "6.18.1", + "@typescript-eslint/parser": "6.19.0", + "@typescript-eslint/website-eslint": "6.19.0", "clsx": "^2.0.0", "eslint": "*", "json-schema": "^0.4.0", @@ -50,9 +50,9 @@ "@types/react": "*", "@types/react-helmet": "^6.1.6", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "6.18.1", - "@typescript-eslint/rule-schema-to-typescript-types": "6.18.1", - "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/eslint-plugin": "6.19.0", + "@typescript-eslint/rule-schema-to-typescript-types": "6.19.0", + "@typescript-eslint/types": "6.19.0", "copy-webpack-plugin": "^11.0.0", "cross-fetch": "*", "globby": "^11.1.0", diff --git a/yarn.lock b/yarn.lock index d2167e10ade3..fc6417562fe4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5221,10 +5221,10 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-internal@workspace:packages/eslint-plugin-internal" dependencies: "@prettier/sync": "*" - "@typescript-eslint/rule-tester": 6.18.1 - "@typescript-eslint/scope-manager": 6.18.1 - "@typescript-eslint/type-utils": 6.18.1 - "@typescript-eslint/utils": 6.18.1 + "@typescript-eslint/rule-tester": 6.19.0 + "@typescript-eslint/scope-manager": 6.19.0 + "@typescript-eslint/type-utils": 6.19.0 + "@typescript-eslint/utils": 6.19.0 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5236,8 +5236,8 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-tslint@workspace:packages/eslint-plugin-tslint" dependencies: "@types/lodash": "*" - "@typescript-eslint/parser": 6.18.1 - "@typescript-eslint/utils": 6.18.1 + "@typescript-eslint/parser": 6.19.0 + "@typescript-eslint/utils": 6.19.0 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5248,7 +5248,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/eslint-plugin@6.18.1, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": +"@typescript-eslint/eslint-plugin@6.19.0, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": version: 0.0.0-use.local resolution: "@typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin" dependencies: @@ -5257,12 +5257,12 @@ __metadata: "@types/debug": "*" "@types/marked": "*" "@types/natural-compare": "*" - "@typescript-eslint/rule-schema-to-typescript-types": 6.18.1 - "@typescript-eslint/rule-tester": 6.18.1 - "@typescript-eslint/scope-manager": 6.18.1 - "@typescript-eslint/type-utils": 6.18.1 - "@typescript-eslint/utils": 6.18.1 - "@typescript-eslint/visitor-keys": 6.18.1 + "@typescript-eslint/rule-schema-to-typescript-types": 6.19.0 + "@typescript-eslint/rule-tester": 6.19.0 + "@typescript-eslint/scope-manager": 6.19.0 + "@typescript-eslint/type-utils": 6.19.0 + "@typescript-eslint/utils": 6.19.0 + "@typescript-eslint/visitor-keys": 6.19.0 ajv: ^6.12.6 chalk: ^5.3.0 cross-fetch: "*" @@ -5301,15 +5301,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@6.18.1, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@6.19.0, @typescript-eslint/parser@workspace:packages/parser": version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: "@types/glob": "*" - "@typescript-eslint/scope-manager": 6.18.1 - "@typescript-eslint/types": 6.18.1 - "@typescript-eslint/typescript-estree": 6.18.1 - "@typescript-eslint/visitor-keys": 6.18.1 + "@typescript-eslint/scope-manager": 6.19.0 + "@typescript-eslint/types": 6.19.0 + "@typescript-eslint/typescript-estree": 6.19.0 + "@typescript-eslint/visitor-keys": 6.19.0 debug: ^4.3.4 downlevel-dts: "*" glob: "*" @@ -5341,26 +5341,26 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/rule-schema-to-typescript-types@6.18.1, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": +"@typescript-eslint/rule-schema-to-typescript-types@6.19.0, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types" dependencies: "@prettier/sync": "*" - "@typescript-eslint/type-utils": 6.18.1 - "@typescript-eslint/utils": 6.18.1 + "@typescript-eslint/type-utils": 6.19.0 + "@typescript-eslint/utils": 6.19.0 natural-compare: ^1.4.0 prettier: ^3.0.3 languageName: unknown linkType: soft -"@typescript-eslint/rule-tester@6.18.1, @typescript-eslint/rule-tester@workspace:packages/rule-tester": +"@typescript-eslint/rule-tester@6.19.0, @typescript-eslint/rule-tester@workspace:packages/rule-tester": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-tester@workspace:packages/rule-tester" dependencies: "@types/lodash.merge": 4.6.9 - "@typescript-eslint/parser": 6.18.1 - "@typescript-eslint/typescript-estree": 6.18.1 - "@typescript-eslint/utils": 6.18.1 + "@typescript-eslint/parser": 6.19.0 + "@typescript-eslint/typescript-estree": 6.19.0 + "@typescript-eslint/utils": 6.19.0 ajv: ^6.10.0 chai: ^4.3.7 lodash.merge: 4.6.2 @@ -5374,15 +5374,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/scope-manager@6.18.1, @typescript-eslint/scope-manager@workspace:packages/scope-manager": +"@typescript-eslint/scope-manager@6.19.0, @typescript-eslint/scope-manager@workspace:packages/scope-manager": version: 0.0.0-use.local resolution: "@typescript-eslint/scope-manager@workspace:packages/scope-manager" dependencies: "@prettier/sync": "*" "@types/glob": "*" - "@typescript-eslint/types": 6.18.1 - "@typescript-eslint/typescript-estree": 6.18.1 - "@typescript-eslint/visitor-keys": 6.18.1 + "@typescript-eslint/types": 6.19.0 + "@typescript-eslint/typescript-estree": 6.19.0 + "@typescript-eslint/visitor-keys": 6.19.0 glob: "*" jest-specific-snapshot: "*" make-dir: "*" @@ -5401,13 +5401,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@6.18.1, @typescript-eslint/type-utils@workspace:packages/type-utils": +"@typescript-eslint/type-utils@6.19.0, @typescript-eslint/type-utils@workspace:packages/type-utils": version: 0.0.0-use.local resolution: "@typescript-eslint/type-utils@workspace:packages/type-utils" dependencies: - "@typescript-eslint/parser": 6.18.1 - "@typescript-eslint/typescript-estree": 6.18.1 - "@typescript-eslint/utils": 6.18.1 + "@typescript-eslint/parser": 6.19.0 + "@typescript-eslint/typescript-estree": 6.19.0 + "@typescript-eslint/utils": 6.19.0 ajv: ^6.10.0 debug: ^4.3.4 downlevel-dts: "*" @@ -5424,7 +5424,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/types@6.18.1, @typescript-eslint/types@workspace:packages/types": +"@typescript-eslint/types@6.19.0, @typescript-eslint/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: @@ -5515,14 +5515,14 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/typescript-estree@6.18.1, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": +"@typescript-eslint/typescript-estree@6.19.0, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": version: 0.0.0-use.local resolution: "@typescript-eslint/typescript-estree@workspace:packages/typescript-estree" dependencies: "@babel/code-frame": "*" "@babel/parser": "*" - "@typescript-eslint/types": 6.18.1 - "@typescript-eslint/visitor-keys": 6.18.1 + "@typescript-eslint/types": 6.19.0 + "@typescript-eslint/visitor-keys": 6.19.0 debug: ^4.3.4 glob: "*" globby: ^11.1.0 @@ -5561,17 +5561,17 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@6.18.1, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": +"@typescript-eslint/utils@6.19.0, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": version: 0.0.0-use.local resolution: "@typescript-eslint/utils@workspace:packages/utils" dependencies: "@eslint-community/eslint-utils": ^4.4.0 "@types/json-schema": ^7.0.12 "@types/semver": ^7.5.0 - "@typescript-eslint/parser": 6.18.1 - "@typescript-eslint/scope-manager": 6.18.1 - "@typescript-eslint/types": 6.18.1 - "@typescript-eslint/typescript-estree": 6.18.1 + "@typescript-eslint/parser": 6.19.0 + "@typescript-eslint/scope-manager": 6.19.0 + "@typescript-eslint/types": 6.19.0 + "@typescript-eslint/typescript-estree": 6.19.0 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.0.3 @@ -5601,12 +5601,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@6.18.1, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": +"@typescript-eslint/visitor-keys@6.19.0, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": version: 0.0.0-use.local resolution: "@typescript-eslint/visitor-keys@workspace:packages/visitor-keys" dependencies: "@types/eslint-visitor-keys": "*" - "@typescript-eslint/types": 6.18.1 + "@typescript-eslint/types": 6.19.0 downlevel-dts: "*" eslint-visitor-keys: ^3.4.1 jest: 29.7.0 @@ -5626,18 +5626,18 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/website-eslint@6.18.1, @typescript-eslint/website-eslint@workspace:packages/website-eslint": +"@typescript-eslint/website-eslint@6.19.0, @typescript-eslint/website-eslint@workspace:packages/website-eslint": version: 0.0.0-use.local resolution: "@typescript-eslint/website-eslint@workspace:packages/website-eslint" dependencies: "@eslint/js": 8.56.0 - "@typescript-eslint/eslint-plugin": 6.18.1 - "@typescript-eslint/parser": 6.18.1 - "@typescript-eslint/scope-manager": 6.18.1 - "@typescript-eslint/types": 6.18.1 - "@typescript-eslint/typescript-estree": 6.18.1 - "@typescript-eslint/utils": 6.18.1 - "@typescript-eslint/visitor-keys": 6.18.1 + "@typescript-eslint/eslint-plugin": 6.19.0 + "@typescript-eslint/parser": 6.19.0 + "@typescript-eslint/scope-manager": 6.19.0 + "@typescript-eslint/types": 6.19.0 + "@typescript-eslint/typescript-estree": 6.19.0 + "@typescript-eslint/utils": 6.19.0 + "@typescript-eslint/visitor-keys": 6.19.0 esbuild: ~0.19.0 eslint: "*" esquery: "*" @@ -18863,11 +18863,11 @@ __metadata: "@types/react": "*" "@types/react-helmet": ^6.1.6 "@types/react-router-dom": ^5.3.3 - "@typescript-eslint/eslint-plugin": 6.18.1 - "@typescript-eslint/parser": 6.18.1 - "@typescript-eslint/rule-schema-to-typescript-types": 6.18.1 - "@typescript-eslint/types": 6.18.1 - "@typescript-eslint/website-eslint": 6.18.1 + "@typescript-eslint/eslint-plugin": 6.19.0 + "@typescript-eslint/parser": 6.19.0 + "@typescript-eslint/rule-schema-to-typescript-types": 6.19.0 + "@typescript-eslint/types": 6.19.0 + "@typescript-eslint/website-eslint": 6.19.0 clsx: ^2.0.0 copy-webpack-plugin: ^11.0.0 cross-fetch: "*" From 4b9a1fa30fa4900f0c334adb03c52f74d8f3c8af Mon Sep 17 00:00:00 2001 From: YeonJuan Date: Tue, 16 Jan 2024 22:34:25 +0900 Subject: [PATCH 070/165] fix(type-utils): preventing isUnsafeAssignment infinite recursive calls (#8237) * fix(type-utils): preventing isUnsafeAssignment infinite recursive calls * chore: apply reviews --- .../tests/rules/no-unsafe-argument.test.ts | 33 +++++++++++++++++ .../tests/rules/no-unsafe-assignment.test.ts | 18 ++++++++++ packages/type-utils/src/isUnsafeAssignment.ts | 35 +++++++++++++++++- .../tests/isUnsafeAssignment.test.ts | 36 +++++++++++++++++-- 4 files changed, 119 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts index 3b17a756c426..e525ac428730 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts @@ -92,6 +92,19 @@ toHaveBeenCalledWith(1 as any); declare function acceptsMap(arg: Map): void; acceptsMap(new Map()); `, + ` +type T = [number, T[]]; +declare function foo(t: T): void; +declare const t: T; + +foo(t); + `, + ` +type T = Array; +declare function foo(t: T): T; +const t: T = []; +foo(t); + `, ], invalid: [ { @@ -352,5 +365,25 @@ foo('a', 1 as any, 'a' as any, 1 as any); }, ], }, + { + code: ` +type T = [number, T[]]; +declare function foo(t: T): void; +declare const t: T; +foo(t as any); + `, + errors: [ + { + messageId: 'unsafeArgument', + line: 5, + column: 5, + endColumn: 13, + data: { + sender: 'any', + receiver: 'T', + }, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts index fb2d713e647f..56da125a97ca 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts @@ -114,6 +114,10 @@ class Foo { 'const x: { y: number } = { y: 1 };', 'const x = [...[1, 2, 3]];', 'const [{ [`x${1}`]: x }] = [{ [`x`]: 1 }] as [{ [`x`]: any }];', + ` +type T = [string, T[]]; +const test: T = ['string', []] as T; + `, { code: ` type Props = { a: string }; @@ -371,5 +375,19 @@ function foo() { }, ], }, + { + code: ` +type T = [string, T[]]; +const test: T = ['string', []] as any; + `, + errors: [ + { + messageId: 'anyAssignment', + line: 3, + column: 7, + endColumn: 38, + }, + ], + }, ], }); diff --git a/packages/type-utils/src/isUnsafeAssignment.ts b/packages/type-utils/src/isUnsafeAssignment.ts index 606fadfdd32c..3f462610a909 100644 --- a/packages/type-utils/src/isUnsafeAssignment.ts +++ b/packages/type-utils/src/isUnsafeAssignment.ts @@ -20,6 +20,22 @@ export function isUnsafeAssignment( receiver: ts.Type, checker: ts.TypeChecker, senderNode: TSESTree.Node | null, +): false | { sender: ts.Type; receiver: ts.Type } { + return isUnsafeAssignmentWorker( + type, + receiver, + checker, + senderNode, + new Map(), + ); +} + +function isUnsafeAssignmentWorker( + type: ts.Type, + receiver: ts.Type, + checker: ts.TypeChecker, + senderNode: TSESTree.Node | null, + visited: Map>, ): false | { sender: ts.Type; receiver: ts.Type } { if (isTypeAnyType(type)) { // Allow assignment of any ==> unknown. @@ -32,6 +48,17 @@ export function isUnsafeAssignment( } } + const typeAlreadyVisited = visited.get(type); + + if (typeAlreadyVisited) { + if (typeAlreadyVisited.has(receiver)) { + return false; + } + typeAlreadyVisited.add(receiver); + } else { + visited.set(type, new Set([receiver])); + } + if (tsutils.isTypeReference(type) && tsutils.isTypeReference(receiver)) { // TODO - figure out how to handle cases like this, // where the types are assignable, but not the same type @@ -72,7 +99,13 @@ export function isUnsafeAssignment( const arg = typeArguments[i]; const receiverArg = receiverTypeArguments[i]; - const unsafe = isUnsafeAssignment(arg, receiverArg, checker, senderNode); + const unsafe = isUnsafeAssignmentWorker( + arg, + receiverArg, + checker, + senderNode, + visited, + ); if (unsafe) { return { sender: type, receiver }; } diff --git a/packages/type-utils/tests/isUnsafeAssignment.test.ts b/packages/type-utils/tests/isUnsafeAssignment.test.ts index 55e2195f93af..733682b5a559 100644 --- a/packages/type-utils/tests/isUnsafeAssignment.test.ts +++ b/packages/type-utils/tests/isUnsafeAssignment.test.ts @@ -9,7 +9,10 @@ import { expectToHaveParserServices } from './test-utils/expectToHaveParserServi describe('isUnsafeAssignment', () => { const rootDir = path.join(__dirname, 'fixtures'); - function getTypes(code: string): { + function getTypes( + code: string, + declarationIndex = 0, + ): { sender: ts.Type; senderNode: TSESTree.Node; receiver: ts.Type; @@ -23,7 +26,9 @@ describe('isUnsafeAssignment', () => { expectToHaveParserServices(services); const checker = services.program.getTypeChecker(); - const declaration = ast.body[0] as TSESTree.VariableDeclaration; + const declaration = ast.body[ + declarationIndex + ] as TSESTree.VariableDeclaration; const declarator = declaration.declarations[0]; return { receiver: services.getTypeAtLocation(declarator.id), @@ -111,6 +116,21 @@ describe('isUnsafeAssignment', () => { 'Set>>', ); }); + + it('circular reference', () => { + const { sender, senderNode, receiver, checker } = getTypes( + `type T = [string, T[]]; + const test: T = ["string", []] as any;`, + 1, + ); + + expectTypesAre( + isUnsafeAssignment(sender, receiver, checker, senderNode), + checker, + 'any', + 'T', + ); + }); }); describe('safe', () => { @@ -202,5 +222,17 @@ describe('isUnsafeAssignment', () => { isUnsafeAssignment(sender, receiver, checker, senderNode), ).toBeFalsy(); }); + + it('circular reference', () => { + const { sender, senderNode, receiver, checker } = getTypes( + `type T = [string, T[]]; + const test: T = ["string", []] as T;`, + 1, + ); + + expect( + isUnsafeAssignment(sender, receiver, checker, senderNode), + ).toBeFalsy(); + }); }); }); From 6d3e60077aff0461f30b4eb89071031504dbe0f4 Mon Sep 17 00:00:00 2001 From: YeonJuan Date: Sat, 20 Jan 2024 00:13:08 +0900 Subject: [PATCH 071/165] fix(eslint-plugin): [no-unnecessary-condition] fix false positive for type variable (#8235) * fix(eslint-plugin): [no-unnecessary-condition] fix false positive for type variable * chore: simplify test cases --- .../src/rules/no-unnecessary-condition.ts | 8 +++++-- .../rules/no-unnecessary-condition.test.ts | 24 ++++++++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index 0a31535797d7..b5819ddb1f0f 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -271,7 +271,10 @@ export default createRule({ if ( isTypeFlagSet( type, - ts.TypeFlags.Any | ts.TypeFlags.Unknown | ts.TypeFlags.TypeParameter, + ts.TypeFlags.Any | + ts.TypeFlags.Unknown | + ts.TypeFlags.TypeParameter | + ts.TypeFlags.TypeVariable, ) ) { return; @@ -345,7 +348,8 @@ export default createRule({ flag |= ts.TypeFlags.Any | ts.TypeFlags.Unknown | - ts.TypeFlags.TypeParameter; + ts.TypeFlags.TypeParameter | + ts.TypeFlags.TypeVariable; // Allow loose comparison to nullish values. if (node.operator === '==' || node.operator === '!=') { diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts index 7c31bf419578..a144c7026c4b 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts @@ -253,6 +253,11 @@ function test(a: T) { const t16 = undefined !== a; } `, + ` +function foo(arg: T, key: keyof T): void { + arg[key] == null; +} + `, // Predicate functions ` @@ -317,6 +322,11 @@ function test(a: T) { ` function test(a: T) { return a ?? 'default'; +} + `, + ` +function foo(arg: T, key: keyof T): void { + arg[key] ?? 'default'; } `, // Indexing cases @@ -740,6 +750,11 @@ foo ||= 1; ` declare let foo: number; foo &&= 1; + `, + ` +function foo(arg: T, key: keyof T): void { + arg[key] ??= 'default'; +} `, // https://github.com/typescript-eslint/typescript-eslint/issues/6264 ` @@ -1084,7 +1099,14 @@ function test(a: never) { `, errors: [ruleError(3, 10, 'never')], }, - + { + code: ` +function test(num: T[K]) { + num ?? 'default'; +} + `, + errors: [ruleError(3, 3, 'neverNullish')], + }, // Predicate functions { code: ` From bf65e222bc614ae77d85898db6ab52aa5dee9485 Mon Sep 17 00:00:00 2001 From: "typescript-eslint[bot]" Date: Mon, 22 Jan 2024 17:16:24 +0000 Subject: [PATCH 072/165] chore(release): publish 6.19.1 --- CHANGELOG.md | 14 +++ packages/ast-spec/CHANGELOG.md | 6 + packages/ast-spec/package.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 6 + packages/eslint-plugin-internal/package.json | 10 +- packages/eslint-plugin-tslint/CHANGELOG.md | 6 + packages/eslint-plugin-tslint/package.json | 6 +- packages/eslint-plugin/CHANGELOG.md | 16 +++ packages/eslint-plugin/package.json | 14 +-- packages/integration-tests/CHANGELOG.md | 6 + packages/integration-tests/package.json | 2 +- packages/parser/CHANGELOG.md | 6 + packages/parser/package.json | 10 +- packages/repo-tools/CHANGELOG.md | 6 + packages/repo-tools/package.json | 2 +- .../CHANGELOG.md | 6 + .../package.json | 6 +- packages/rule-tester/CHANGELOG.md | 6 + packages/rule-tester/package.json | 8 +- packages/scope-manager/CHANGELOG.md | 6 + packages/scope-manager/package.json | 8 +- packages/type-utils/CHANGELOG.md | 14 +++ packages/type-utils/package.json | 8 +- packages/types/CHANGELOG.md | 6 + packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 6 + packages/typescript-estree/package.json | 6 +- packages/utils/CHANGELOG.md | 6 + packages/utils/package.json | 10 +- packages/visitor-keys/CHANGELOG.md | 6 + packages/visitor-keys/package.json | 4 +- packages/website-eslint/CHANGELOG.md | 6 + packages/website-eslint/package.json | 16 +-- packages/website/CHANGELOG.md | 6 + packages/website/package.json | 12 +- yarn.lock | 114 +++++++++--------- 36 files changed, 254 insertions(+), 120 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af44283abf4c..6ba4d93cad77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## 6.19.1 (2024-01-22) + + +### 🩹 Fixes + +- **eslint-plugin:** [no-unnecessary-condition] fix false positive for type variable ([#8235](https://github.com/typescript-eslint/typescript-eslint/pull/8235)) +- **type-utils:** preventing isUnsafeAssignment infinite recursive calls ([#8237](https://github.com/typescript-eslint/typescript-eslint/pull/8237)) + +### ❤️ Thank You + +- YeonJuan @yeonjuan + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 47d00a853303..aaf0e9f4566e 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for ast-spec to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 1132cccd79de..565734c9c5ca 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "6.19.0", + "version": "6.19.1", "description": "Complete specification for the TypeScript-ESTree AST", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 3633512769c8..76c8d7f3786b 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 33a7edcb37f6..394dd5ac8b1f 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "6.19.0", + "version": "6.19.1", "private": true, "main": "dist/index.js", "scripts": { @@ -14,10 +14,10 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/rule-tester": "6.19.0", - "@typescript-eslint/scope-manager": "6.19.0", - "@typescript-eslint/type-utils": "6.19.0", - "@typescript-eslint/utils": "6.19.0", + "@typescript-eslint/rule-tester": "6.19.1", + "@typescript-eslint/scope-manager": "6.19.1", + "@typescript-eslint/type-utils": "6.19.1", + "@typescript-eslint/utils": "6.19.1", "prettier": "^3.0.3" }, "devDependencies": { diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 44fcbf80c54b..d6803a2ae82d 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for eslint-plugin-tslint to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for eslint-plugin-tslint to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index ca06480892b5..4cde53c4a132 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "6.19.0", + "version": "6.19.1", "main": "dist/index.js", "typings": "src/index.ts", "description": "ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint", @@ -46,7 +46,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "6.19.0" + "@typescript-eslint/utils": "6.19.1" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0", @@ -55,7 +55,7 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "6.19.0", + "@typescript-eslint/parser": "6.19.1", "jest": "29.7.0", "prettier": "^3.0.3", "rimraf": "*" diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 64a4e1dcd452..ac21a7141869 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,3 +1,19 @@ +## 6.19.1 (2024-01-22) + + +### 🩹 Fixes + +- **type-utils:** preventing isUnsafeAssignment infinite recursive calls + +- **eslint-plugin:** [no-unnecessary-condition] fix false positive for type variable + + +### ❤️ Thank You + +- YeonJuan + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 2066c7e99c29..04800761b834 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "6.19.0", + "version": "6.19.1", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -57,10 +57,10 @@ }, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.19.0", - "@typescript-eslint/type-utils": "6.19.0", - "@typescript-eslint/utils": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0", + "@typescript-eslint/scope-manager": "6.19.1", + "@typescript-eslint/type-utils": "6.19.1", + "@typescript-eslint/utils": "6.19.1", + "@typescript-eslint/visitor-keys": "6.19.1", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -73,8 +73,8 @@ "@types/debug": "*", "@types/marked": "*", "@types/natural-compare": "*", - "@typescript-eslint/rule-schema-to-typescript-types": "6.19.0", - "@typescript-eslint/rule-tester": "6.19.0", + "@typescript-eslint/rule-schema-to-typescript-types": "6.19.1", + "@typescript-eslint/rule-tester": "6.19.1", "ajv": "^6.12.6", "chalk": "^5.3.0", "cross-fetch": "*", diff --git a/packages/integration-tests/CHANGELOG.md b/packages/integration-tests/CHANGELOG.md index d254a11713de..e0bd38b1bf57 100644 --- a/packages/integration-tests/CHANGELOG.md +++ b/packages/integration-tests/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for integration-tests to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for integration-tests to align it with other projects, there were no code changes. diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index cc57c27bd0c6..f10c71fbe117 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/integration-tests", - "version": "6.19.0", + "version": "6.19.1", "private": true, "scripts": { "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index e5fbedc0de30..88aa48e06499 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for parser to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for parser to align it with other projects, there were no code changes. diff --git a/packages/parser/package.json b/packages/parser/package.json index 3f314a9c0a3f..1a68fac66293 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "6.19.0", + "version": "6.19.1", "description": "An ESLint custom parser which leverages TypeScript ESTree", "files": [ "dist", @@ -51,10 +51,10 @@ "eslint": "^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "6.19.0", - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/typescript-estree": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0", + "@typescript-eslint/scope-manager": "6.19.1", + "@typescript-eslint/types": "6.19.1", + "@typescript-eslint/typescript-estree": "6.19.1", + "@typescript-eslint/visitor-keys": "6.19.1", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index a3a213849d57..ffbaa2c4bb7e 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for repo-tools to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for repo-tools to align it with other projects, there were no code changes. diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index 527094065401..d3fa46e2eee3 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/repo-tools", - "version": "6.19.0", + "version": "6.19.1", "private": true, "scripts": { "//": "NOTE: intentionally no build step in this package", diff --git a/packages/rule-schema-to-typescript-types/CHANGELOG.md b/packages/rule-schema-to-typescript-types/CHANGELOG.md index 663193236149..31d14f226f38 100644 --- a/packages/rule-schema-to-typescript-types/CHANGELOG.md +++ b/packages/rule-schema-to-typescript-types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index 2004f67e90de..aec08d59afa2 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-schema-to-typescript-types", - "version": "6.19.0", + "version": "6.19.1", "private": true, "type": "commonjs", "exports": { @@ -34,8 +34,8 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/type-utils": "6.19.0", - "@typescript-eslint/utils": "6.19.0", + "@typescript-eslint/type-utils": "6.19.1", + "@typescript-eslint/utils": "6.19.1", "natural-compare": "^1.4.0", "prettier": "^3.0.3" }, diff --git a/packages/rule-tester/CHANGELOG.md b/packages/rule-tester/CHANGELOG.md index 2c5785181b72..c2b3ca916d7a 100644 --- a/packages/rule-tester/CHANGELOG.md +++ b/packages/rule-tester/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for rule-tester to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for rule-tester to align it with other projects, there were no code changes. diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index fc613092dbd2..e99f75099698 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-tester", - "version": "6.19.0", + "version": "6.19.1", "description": "Tooling to test ESLint rules", "files": [ "dist", @@ -47,8 +47,8 @@ }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { - "@typescript-eslint/typescript-estree": "6.19.0", - "@typescript-eslint/utils": "6.19.0", + "@typescript-eslint/typescript-estree": "6.19.1", + "@typescript-eslint/utils": "6.19.1", "ajv": "^6.10.0", "lodash.merge": "4.6.2", "semver": "^7.5.4" @@ -59,7 +59,7 @@ }, "devDependencies": { "@types/lodash.merge": "4.6.9", - "@typescript-eslint/parser": "6.19.0", + "@typescript-eslint/parser": "6.19.1", "chai": "^4.3.7", "mocha": "^10.0.0", "sinon": "^16.0.0", diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 4cf6f4348675..3f28bdd40218 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for scope-manager to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for scope-manager to align it with other projects, there were no code changes. diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index d80e065def42..ce447d544b09 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "6.19.0", + "version": "6.19.1", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -44,13 +44,13 @@ "typecheck": "npx nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0" + "@typescript-eslint/types": "6.19.1", + "@typescript-eslint/visitor-keys": "6.19.1" }, "devDependencies": { "@prettier/sync": "*", "@types/glob": "*", - "@typescript-eslint/typescript-estree": "6.19.0", + "@typescript-eslint/typescript-estree": "6.19.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index f90bb7b61fc6..5add03e038f6 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -1,3 +1,17 @@ +## 6.19.1 (2024-01-22) + + +### 🩹 Fixes + +- **type-utils:** preventing isUnsafeAssignment infinite recursive calls + + +### ❤️ Thank You + +- YeonJuan + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index d3635aabf5d6..40bb807c187a 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "6.19.0", + "version": "6.19.1", "description": "Type utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -45,13 +45,13 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "6.19.0", - "@typescript-eslint/utils": "6.19.0", + "@typescript-eslint/typescript-estree": "6.19.1", + "@typescript-eslint/utils": "6.19.1", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "devDependencies": { - "@typescript-eslint/parser": "6.19.0", + "@typescript-eslint/parser": "6.19.1", "ajv": "^6.10.0", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index ee88f19fed34..71e200aa690d 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for types to align it with other projects, there were no code changes. diff --git a/packages/types/package.json b/packages/types/package.json index e6484f0156ef..ffe604a3beab 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "6.19.0", + "version": "6.19.1", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index f01e5284b199..8fef02eac6ec 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for typescript-estree to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index ffa4a4049379..a250df8f0bc9 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "6.19.0", + "version": "6.19.1", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "files": [ "dist", @@ -52,8 +52,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0", + "@typescript-eslint/types": "6.19.1", + "@typescript-eslint/visitor-keys": "6.19.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index d47292d16a8a..a446dfdfec02 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for utils to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for utils to align it with other projects, there were no code changes. diff --git a/packages/utils/package.json b/packages/utils/package.json index e6fd7c529377..84a88ffc53b6 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "6.19.0", + "version": "6.19.1", "description": "Utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -68,16 +68,16 @@ "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.19.0", - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/typescript-estree": "6.19.0", + "@typescript-eslint/scope-manager": "6.19.1", + "@typescript-eslint/types": "6.19.1", + "@typescript-eslint/typescript-estree": "6.19.1", "semver": "^7.5.4" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { - "@typescript-eslint/parser": "6.19.0", + "@typescript-eslint/parser": "6.19.1", "downlevel-dts": "*", "jest": "29.7.0", "prettier": "^3.0.3", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 720a04734ade..25dd6ea911ce 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for visitor-keys to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index b6444d5107e6..b35a7886c91a 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "6.19.0", + "version": "6.19.1", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "files": [ "dist", @@ -45,7 +45,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.19.0", + "@typescript-eslint/types": "6.19.1", "eslint-visitor-keys": "^3.4.1" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index eea73823bbc9..b8d2b86118a1 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for website-eslint to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for website-eslint to align it with other projects, there were no code changes. diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index 71b4e13a5fbc..ebee17153dce 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "6.19.0", + "version": "6.19.1", "private": true, "description": "ESLint which works in browsers.", "files": [ @@ -23,16 +23,16 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/utils": "6.19.0" + "@typescript-eslint/types": "6.19.1", + "@typescript-eslint/utils": "6.19.1" }, "devDependencies": { "@eslint/js": "8.56.0", - "@typescript-eslint/eslint-plugin": "6.19.0", - "@typescript-eslint/parser": "6.19.0", - "@typescript-eslint/scope-manager": "6.19.0", - "@typescript-eslint/typescript-estree": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0", + "@typescript-eslint/eslint-plugin": "6.19.1", + "@typescript-eslint/parser": "6.19.1", + "@typescript-eslint/scope-manager": "6.19.1", + "@typescript-eslint/typescript-estree": "6.19.1", + "@typescript-eslint/visitor-keys": "6.19.1", "esbuild": "~0.19.0", "eslint": "*", "esquery": "*", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index c647d2d15e38..26edbcf98fac 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.19.1 (2024-01-22) + +This was a version bump only for website to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.0 (2024-01-15) This was a version bump only for website to align it with other projects, there were no code changes. diff --git a/packages/website/package.json b/packages/website/package.json index cf6ca13d4a4e..5b55982f1fa3 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "6.19.0", + "version": "6.19.1", "private": true, "scripts": { "build": "docusaurus build", @@ -24,8 +24,8 @@ "@docusaurus/theme-common": "~2.4.1", "@mdx-js/react": "1.6.22", "@prettier/sync": "*", - "@typescript-eslint/parser": "6.19.0", - "@typescript-eslint/website-eslint": "6.19.0", + "@typescript-eslint/parser": "6.19.1", + "@typescript-eslint/website-eslint": "6.19.1", "clsx": "^2.0.0", "eslint": "*", "json-schema": "^0.4.0", @@ -50,9 +50,9 @@ "@types/react": "*", "@types/react-helmet": "^6.1.6", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "6.19.0", - "@typescript-eslint/rule-schema-to-typescript-types": "6.19.0", - "@typescript-eslint/types": "6.19.0", + "@typescript-eslint/eslint-plugin": "6.19.1", + "@typescript-eslint/rule-schema-to-typescript-types": "6.19.1", + "@typescript-eslint/types": "6.19.1", "copy-webpack-plugin": "^11.0.0", "cross-fetch": "*", "globby": "^11.1.0", diff --git a/yarn.lock b/yarn.lock index fc6417562fe4..5138bd091421 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5221,10 +5221,10 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-internal@workspace:packages/eslint-plugin-internal" dependencies: "@prettier/sync": "*" - "@typescript-eslint/rule-tester": 6.19.0 - "@typescript-eslint/scope-manager": 6.19.0 - "@typescript-eslint/type-utils": 6.19.0 - "@typescript-eslint/utils": 6.19.0 + "@typescript-eslint/rule-tester": 6.19.1 + "@typescript-eslint/scope-manager": 6.19.1 + "@typescript-eslint/type-utils": 6.19.1 + "@typescript-eslint/utils": 6.19.1 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5236,8 +5236,8 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-tslint@workspace:packages/eslint-plugin-tslint" dependencies: "@types/lodash": "*" - "@typescript-eslint/parser": 6.19.0 - "@typescript-eslint/utils": 6.19.0 + "@typescript-eslint/parser": 6.19.1 + "@typescript-eslint/utils": 6.19.1 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5248,7 +5248,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/eslint-plugin@6.19.0, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": +"@typescript-eslint/eslint-plugin@6.19.1, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": version: 0.0.0-use.local resolution: "@typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin" dependencies: @@ -5257,12 +5257,12 @@ __metadata: "@types/debug": "*" "@types/marked": "*" "@types/natural-compare": "*" - "@typescript-eslint/rule-schema-to-typescript-types": 6.19.0 - "@typescript-eslint/rule-tester": 6.19.0 - "@typescript-eslint/scope-manager": 6.19.0 - "@typescript-eslint/type-utils": 6.19.0 - "@typescript-eslint/utils": 6.19.0 - "@typescript-eslint/visitor-keys": 6.19.0 + "@typescript-eslint/rule-schema-to-typescript-types": 6.19.1 + "@typescript-eslint/rule-tester": 6.19.1 + "@typescript-eslint/scope-manager": 6.19.1 + "@typescript-eslint/type-utils": 6.19.1 + "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/visitor-keys": 6.19.1 ajv: ^6.12.6 chalk: ^5.3.0 cross-fetch: "*" @@ -5301,15 +5301,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@6.19.0, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@6.19.1, @typescript-eslint/parser@workspace:packages/parser": version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: "@types/glob": "*" - "@typescript-eslint/scope-manager": 6.19.0 - "@typescript-eslint/types": 6.19.0 - "@typescript-eslint/typescript-estree": 6.19.0 - "@typescript-eslint/visitor-keys": 6.19.0 + "@typescript-eslint/scope-manager": 6.19.1 + "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/typescript-estree": 6.19.1 + "@typescript-eslint/visitor-keys": 6.19.1 debug: ^4.3.4 downlevel-dts: "*" glob: "*" @@ -5341,26 +5341,26 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/rule-schema-to-typescript-types@6.19.0, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": +"@typescript-eslint/rule-schema-to-typescript-types@6.19.1, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types" dependencies: "@prettier/sync": "*" - "@typescript-eslint/type-utils": 6.19.0 - "@typescript-eslint/utils": 6.19.0 + "@typescript-eslint/type-utils": 6.19.1 + "@typescript-eslint/utils": 6.19.1 natural-compare: ^1.4.0 prettier: ^3.0.3 languageName: unknown linkType: soft -"@typescript-eslint/rule-tester@6.19.0, @typescript-eslint/rule-tester@workspace:packages/rule-tester": +"@typescript-eslint/rule-tester@6.19.1, @typescript-eslint/rule-tester@workspace:packages/rule-tester": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-tester@workspace:packages/rule-tester" dependencies: "@types/lodash.merge": 4.6.9 - "@typescript-eslint/parser": 6.19.0 - "@typescript-eslint/typescript-estree": 6.19.0 - "@typescript-eslint/utils": 6.19.0 + "@typescript-eslint/parser": 6.19.1 + "@typescript-eslint/typescript-estree": 6.19.1 + "@typescript-eslint/utils": 6.19.1 ajv: ^6.10.0 chai: ^4.3.7 lodash.merge: 4.6.2 @@ -5374,15 +5374,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/scope-manager@6.19.0, @typescript-eslint/scope-manager@workspace:packages/scope-manager": +"@typescript-eslint/scope-manager@6.19.1, @typescript-eslint/scope-manager@workspace:packages/scope-manager": version: 0.0.0-use.local resolution: "@typescript-eslint/scope-manager@workspace:packages/scope-manager" dependencies: "@prettier/sync": "*" "@types/glob": "*" - "@typescript-eslint/types": 6.19.0 - "@typescript-eslint/typescript-estree": 6.19.0 - "@typescript-eslint/visitor-keys": 6.19.0 + "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/typescript-estree": 6.19.1 + "@typescript-eslint/visitor-keys": 6.19.1 glob: "*" jest-specific-snapshot: "*" make-dir: "*" @@ -5401,13 +5401,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@6.19.0, @typescript-eslint/type-utils@workspace:packages/type-utils": +"@typescript-eslint/type-utils@6.19.1, @typescript-eslint/type-utils@workspace:packages/type-utils": version: 0.0.0-use.local resolution: "@typescript-eslint/type-utils@workspace:packages/type-utils" dependencies: - "@typescript-eslint/parser": 6.19.0 - "@typescript-eslint/typescript-estree": 6.19.0 - "@typescript-eslint/utils": 6.19.0 + "@typescript-eslint/parser": 6.19.1 + "@typescript-eslint/typescript-estree": 6.19.1 + "@typescript-eslint/utils": 6.19.1 ajv: ^6.10.0 debug: ^4.3.4 downlevel-dts: "*" @@ -5424,7 +5424,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/types@6.19.0, @typescript-eslint/types@workspace:packages/types": +"@typescript-eslint/types@6.19.1, @typescript-eslint/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: @@ -5515,14 +5515,14 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/typescript-estree@6.19.0, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": +"@typescript-eslint/typescript-estree@6.19.1, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": version: 0.0.0-use.local resolution: "@typescript-eslint/typescript-estree@workspace:packages/typescript-estree" dependencies: "@babel/code-frame": "*" "@babel/parser": "*" - "@typescript-eslint/types": 6.19.0 - "@typescript-eslint/visitor-keys": 6.19.0 + "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/visitor-keys": 6.19.1 debug: ^4.3.4 glob: "*" globby: ^11.1.0 @@ -5561,17 +5561,17 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@6.19.0, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": +"@typescript-eslint/utils@6.19.1, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": version: 0.0.0-use.local resolution: "@typescript-eslint/utils@workspace:packages/utils" dependencies: "@eslint-community/eslint-utils": ^4.4.0 "@types/json-schema": ^7.0.12 "@types/semver": ^7.5.0 - "@typescript-eslint/parser": 6.19.0 - "@typescript-eslint/scope-manager": 6.19.0 - "@typescript-eslint/types": 6.19.0 - "@typescript-eslint/typescript-estree": 6.19.0 + "@typescript-eslint/parser": 6.19.1 + "@typescript-eslint/scope-manager": 6.19.1 + "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/typescript-estree": 6.19.1 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.0.3 @@ -5601,12 +5601,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@6.19.0, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": +"@typescript-eslint/visitor-keys@6.19.1, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": version: 0.0.0-use.local resolution: "@typescript-eslint/visitor-keys@workspace:packages/visitor-keys" dependencies: "@types/eslint-visitor-keys": "*" - "@typescript-eslint/types": 6.19.0 + "@typescript-eslint/types": 6.19.1 downlevel-dts: "*" eslint-visitor-keys: ^3.4.1 jest: 29.7.0 @@ -5626,18 +5626,18 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/website-eslint@6.19.0, @typescript-eslint/website-eslint@workspace:packages/website-eslint": +"@typescript-eslint/website-eslint@6.19.1, @typescript-eslint/website-eslint@workspace:packages/website-eslint": version: 0.0.0-use.local resolution: "@typescript-eslint/website-eslint@workspace:packages/website-eslint" dependencies: "@eslint/js": 8.56.0 - "@typescript-eslint/eslint-plugin": 6.19.0 - "@typescript-eslint/parser": 6.19.0 - "@typescript-eslint/scope-manager": 6.19.0 - "@typescript-eslint/types": 6.19.0 - "@typescript-eslint/typescript-estree": 6.19.0 - "@typescript-eslint/utils": 6.19.0 - "@typescript-eslint/visitor-keys": 6.19.0 + "@typescript-eslint/eslint-plugin": 6.19.1 + "@typescript-eslint/parser": 6.19.1 + "@typescript-eslint/scope-manager": 6.19.1 + "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/typescript-estree": 6.19.1 + "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/visitor-keys": 6.19.1 esbuild: ~0.19.0 eslint: "*" esquery: "*" @@ -18863,11 +18863,11 @@ __metadata: "@types/react": "*" "@types/react-helmet": ^6.1.6 "@types/react-router-dom": ^5.3.3 - "@typescript-eslint/eslint-plugin": 6.19.0 - "@typescript-eslint/parser": 6.19.0 - "@typescript-eslint/rule-schema-to-typescript-types": 6.19.0 - "@typescript-eslint/types": 6.19.0 - "@typescript-eslint/website-eslint": 6.19.0 + "@typescript-eslint/eslint-plugin": 6.19.1 + "@typescript-eslint/parser": 6.19.1 + "@typescript-eslint/rule-schema-to-typescript-types": 6.19.1 + "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/website-eslint": 6.19.1 clsx: ^2.0.0 copy-webpack-plugin: ^11.0.0 cross-fetch: "*" From e177a3328011fe8ea8034c9d57c6398afa83946b Mon Sep 17 00:00:00 2001 From: YeonJuan Date: Tue, 23 Jan 2024 02:56:05 +0900 Subject: [PATCH 073/165] fix(eslint-plugin): [no-useless-template-literals] incorrect bigint autofix result (#8283) --- .../src/rules/no-useless-template-literals.ts | 13 +++------- .../no-useless-template-literals.test.ts | 25 ++++++++++++++++++- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-useless-template-literals.ts b/packages/eslint-plugin/src/rules/no-useless-template-literals.ts index d5a8a602b6b4..394947ff9a32 100644 --- a/packages/eslint-plugin/src/rules/no-useless-template-literals.ts +++ b/packages/eslint-plugin/src/rules/no-useless-template-literals.ts @@ -6,6 +6,7 @@ import { createRule, getConstrainedTypeAtLocation, getParserServices, + getStaticStringValue, isTypeFlagSet, isUndefinedIdentifier, } from '../util'; @@ -118,16 +119,10 @@ export default createRule<[], MessageId>({ ]), ]; - // Remove quotes for string literals (i.e. `'a'` will become `a`). - const isStringLiteral = - isUnderlyingTypeString(expression) && - expression.type === AST_NODE_TYPES.Literal; + const stringValue = getStaticStringValue(expression); - if (isStringLiteral) { - const escapedValue = expression.value.replace( - /([`$\\])/g, - '\\$1', - ); + if (stringValue != null) { + const escapedValue = stringValue.replace(/([`$\\])/g, '\\$1'); fixes.push(fixer.replaceText(expression, escapedValue)); } diff --git a/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts b/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts index 674b4ccefe77..0bbd79c15654 100644 --- a/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts +++ b/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts @@ -17,7 +17,6 @@ ruleTester.run('no-useless-template-literals', rule, { valid: [ "const string = 'a';", 'const string = `a`;', - ` declare const string: 'a'; \`\${string}b\`; @@ -147,6 +146,30 @@ ruleTester.run('no-useless-template-literals', rule, { }, ], }, + { + code: '`${1n}`;', + output: '`1`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + line: 1, + column: 4, + endColumn: 6, + }, + ], + }, + { + code: '`${/a/}`;', + output: '`/a/`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + line: 1, + column: 4, + endColumn: 7, + }, + ], + }, { code: noFormat`\`\${ 1 }\`;`, From 52538562a6be9d6170ef085b4999b3c355770c7d Mon Sep 17 00:00:00 2001 From: Lucas Amberg <102396588+lucas-amberg@users.noreply.github.com> Date: Thu, 25 Jan 2024 04:17:09 -0800 Subject: [PATCH 074/165] docs: underline URLs, change contrast in syntax highlighting (#8225) * Add underlines on all links other than menu, table of contents * Fix comment in css Include next page in comment as I forgot to include it beforehand * Add comment whitespace * Remove underlines from navbar, buttons * Fix CSS in blog page causing headers, sidebar links to be underlined * Alter CSS to change only anchor elements inside .markdown class * Update styles to change color contrast in syntax highlighting --- packages/website/src/css/custom.css | 4 ++++ packages/website/src/css/prism.css | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/website/src/css/custom.css b/packages/website/src/css/custom.css index 8cfb3dc2c0f7..7e1e417c8692 100644 --- a/packages/website/src/css/custom.css +++ b/packages/website/src/css/custom.css @@ -191,3 +191,7 @@ h6 { [data-theme='dark'] .code-block-added-line { background-color: #00ff9510; } + +.markdown a { + text-decoration: underline; +} diff --git a/packages/website/src/css/prism.css b/packages/website/src/css/prism.css index d5a7c9f6b99d..392cf22277bf 100644 --- a/packages/website/src/css/prism.css +++ b/packages/website/src/css/prism.css @@ -6,16 +6,16 @@ --token-color-doctype: #008000; --token-color-string: #a31515; --token-color-operator: #393a34; - --token-color-symbol: #36acaa; + --token-color-symbol: #277c7b; --token-color-number: #098658; --token-color-keyword: #00f; - --token-color-function: #569cd6; + --token-color-function: #2b74b1; --token-color-function-variable: #000; --token-color-important: #e90; - --token-color-class-name: #2b91af; + --token-color-class-name: #237690; --token-color-selector: #800000; --token-color-regexp: #800000; - --token-color-property: #d00; + --token-color-property: #c70000; --token-color-builtin: #00f; --token-color-boolean: #00f; --token-color-inserted: #247e81; @@ -28,9 +28,9 @@ html[data-theme='dark'] { --token-color: #f8f8f2; --token-background: var(--ifm-background-surface-color); --token-border: #414458; - --token-color-comment: #737373; + --token-color-comment: #9e9e9e; --token-color-doctype: #6a9955; - --token-color-string: #6a9955; + --token-color-string: #78a861; --token-color-operator: #d4d4d4; --token-color-symbol: #b5cea8; --token-color-number: #b5cea8; From 3bfe101182b0ff39b3bb9cad1724a981358c4015 Mon Sep 17 00:00:00 2001 From: "typescript-eslint[bot]" <53356952+typescript-eslint[bot]@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:25:46 +0800 Subject: [PATCH 075/165] chore: update sponsors (#8303) Co-authored-by: typescript-eslint[bot] --- packages/website/data/sponsors.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/website/data/sponsors.json b/packages/website/data/sponsors.json index 45f8d72856f6..81dd7057d652 100644 --- a/packages/website/data/sponsors.json +++ b/packages/website/data/sponsors.json @@ -83,6 +83,13 @@ "totalDonations": 114800, "website": "https://sentry.io/welcome/" }, + { + "id": "THANKS.DEV", + "image": "https://images.opencollective.com/thanks-dev/ed78b39/logo.png", + "name": "THANKS.DEV", + "totalDonations": 91083, + "website": "https://thanks.dev" + }, { "id": "EY Doberman", "image": "https://images.opencollective.com/ey-doberman/b269462/logo.png", @@ -230,13 +237,6 @@ "totalDonations": 15000, "website": "https://paddn.com/" }, - { - "id": "THANKS.DEV", - "image": "https://images.opencollective.com/thanks-dev/ed78b39/logo.png", - "name": "THANKS.DEV", - "totalDonations": 14761, - "website": "https://thanks.dev" - }, { "id": "Now4real", "image": "https://images.opencollective.com/now4real/54ca7d9/logo.png", From 2e9035ad19be7ffce73db0c2cf6b70d229baf1bb Mon Sep 17 00:00:00 2001 From: James <5511220+Zamiell@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:09:03 -0500 Subject: [PATCH 076/165] docs: add `import/no-unresolved` to perf troubleshooting docs (#8190) --- docs/linting/troubleshooting/Performance.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/linting/troubleshooting/Performance.mdx b/docs/linting/troubleshooting/Performance.mdx index ec90afca02eb..71523c0db210 100644 --- a/docs/linting/troubleshooting/Performance.mdx +++ b/docs/linting/troubleshooting/Performance.mdx @@ -85,6 +85,7 @@ We recommend you do not use the following rules, as TypeScript provides the same - `import/namespace` - `import/default` - `import/no-named-as-default-member` +- `import/no-unresolved` (as long as you are using [`import` over `require`](https://typescript-eslint.io/rules/no-var-requires/)) The following rules do not have equivalent checks in TypeScript, so we recommend that you only run them at CI/push time, to lessen the local performance burden. From 78c165b660defdf7c698e9d3fba54bfa479311a0 Mon Sep 17 00:00:00 2001 From: Alex Parloti Date: Sat, 27 Jan 2024 22:34:57 -0400 Subject: [PATCH 077/165] feat(eslint-plugin): [member-ordering] allow easy reuse of the default ordering (#8248) --- .../docs/rules/member-ordering.md | 329 ++++++++++-------- .../src/rules/member-ordering.ts | 6 +- .../tests/rules/member-ordering.test.ts | 116 ++++++ 3 files changed, 309 insertions(+), 142 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/member-ordering.md b/packages/eslint-plugin/docs/rules/member-ordering.md index 711d590728c1..74fa2127b392 100644 --- a/packages/eslint-plugin/docs/rules/member-ordering.md +++ b/packages/eslint-plugin/docs/rules/member-ordering.md @@ -25,7 +25,7 @@ type OrderConfig = MemberType[] | SortedOrderConfig | 'never'; interface SortedOrderConfig { memberTypes?: MemberType[] | 'never'; optionalityOrder?: 'optional-first' | 'required-first'; - order: + order?: | 'alphabetically' | 'alphabetically-case-insensitive' | 'as-written' @@ -80,176 +80,178 @@ The default configuration looks as follows: ```jsonc { - "default": [ - // Index signature - "signature", - "call-signature", + "default": { + "memberTypes": [ + // Index signature + "signature", + "call-signature", - // Fields - "public-static-field", - "protected-static-field", - "private-static-field", - "#private-static-field", + // Fields + "public-static-field", + "protected-static-field", + "private-static-field", + "#private-static-field", - "public-decorated-field", - "protected-decorated-field", - "private-decorated-field", + "public-decorated-field", + "protected-decorated-field", + "private-decorated-field", - "public-instance-field", - "protected-instance-field", - "private-instance-field", - "#private-instance-field", + "public-instance-field", + "protected-instance-field", + "private-instance-field", + "#private-instance-field", - "public-abstract-field", - "protected-abstract-field", + "public-abstract-field", + "protected-abstract-field", - "public-field", - "protected-field", - "private-field", - "#private-field", + "public-field", + "protected-field", + "private-field", + "#private-field", - "static-field", - "instance-field", - "abstract-field", + "static-field", + "instance-field", + "abstract-field", - "decorated-field", + "decorated-field", - "field", + "field", - // Static initialization - "static-initialization", + // Static initialization + "static-initialization", - // Constructors - "public-constructor", - "protected-constructor", - "private-constructor", + // Constructors + "public-constructor", + "protected-constructor", + "private-constructor", - "constructor", + "constructor", - // Accessors - "public-static-accessor", - "protected-static-accessor", - "private-static-accessor", - "#private-static-accessor", + // Accessors + "public-static-accessor", + "protected-static-accessor", + "private-static-accessor", + "#private-static-accessor", - "public-decorated-accessor", - "protected-decorated-accessor", - "private-decorated-accessor", + "public-decorated-accessor", + "protected-decorated-accessor", + "private-decorated-accessor", - "public-instance-accessor", - "protected-instance-accessor", - "private-instance-accessor", - "#private-instance-accessor", + "public-instance-accessor", + "protected-instance-accessor", + "private-instance-accessor", + "#private-instance-accessor", - "public-abstract-accessor", - "protected-abstract-accessor", + "public-abstract-accessor", + "protected-abstract-accessor", - "public-accessor", - "protected-accessor", - "private-accessor", - "#private-accessor", + "public-accessor", + "protected-accessor", + "private-accessor", + "#private-accessor", - "static-accessor", - "instance-accessor", - "abstract-accessor", + "static-accessor", + "instance-accessor", + "abstract-accessor", - "decorated-accessor", + "decorated-accessor", - "accessor", + "accessor", - // Getters - "public-static-get", - "protected-static-get", - "private-static-get", - "#private-static-get", + // Getters + "public-static-get", + "protected-static-get", + "private-static-get", + "#private-static-get", - "public-decorated-get", - "protected-decorated-get", - "private-decorated-get", + "public-decorated-get", + "protected-decorated-get", + "private-decorated-get", - "public-instance-get", - "protected-instance-get", - "private-instance-get", - "#private-instance-get", + "public-instance-get", + "protected-instance-get", + "private-instance-get", + "#private-instance-get", - "public-abstract-get", - "protected-abstract-get", + "public-abstract-get", + "protected-abstract-get", - "public-get", - "protected-get", - "private-get", - "#private-get", + "public-get", + "protected-get", + "private-get", + "#private-get", - "static-get", - "instance-get", - "abstract-get", + "static-get", + "instance-get", + "abstract-get", - "decorated-get", + "decorated-get", - "get", + "get", - // Setters - "public-static-set", - "protected-static-set", - "private-static-set", - "#private-static-set", + // Setters + "public-static-set", + "protected-static-set", + "private-static-set", + "#private-static-set", - "public-decorated-set", - "protected-decorated-set", - "private-decorated-set", + "public-decorated-set", + "protected-decorated-set", + "private-decorated-set", - "public-instance-set", - "protected-instance-set", - "private-instance-set", - "#private-instance-set", + "public-instance-set", + "protected-instance-set", + "private-instance-set", + "#private-instance-set", - "public-abstract-set", - "protected-abstract-set", + "public-abstract-set", + "protected-abstract-set", - "public-set", - "protected-set", - "private-set", - "#private-set", + "public-set", + "protected-set", + "private-set", + "#private-set", - "static-set", - "instance-set", - "abstract-set", + "static-set", + "instance-set", + "abstract-set", - "decorated-set", + "decorated-set", - "set", + "set", - // Methods - "public-static-method", - "protected-static-method", - "private-static-method", - "#private-static-method", + // Methods + "public-static-method", + "protected-static-method", + "private-static-method", + "#private-static-method", - "public-decorated-method", - "protected-decorated-method", - "private-decorated-method", + "public-decorated-method", + "protected-decorated-method", + "private-decorated-method", - "public-instance-method", - "protected-instance-method", - "private-instance-method", - "#private-instance-method", + "public-instance-method", + "protected-instance-method", + "private-instance-method", + "#private-instance-method", - "public-abstract-method", - "protected-abstract-method", + "public-abstract-method", + "protected-abstract-method", - "public-method", - "protected-method", - "private-method", - "#private-method", + "public-method", + "protected-method", + "private-method", + "#private-method", - "static-method", - "instance-method", - "abstract-method", + "static-method", + "instance-method", + "abstract-method", - "decorated-method", + "decorated-method", - "method" - ] + "method" + ] + } } ``` @@ -792,7 +794,8 @@ type Foo = { #### Sorting Alphabetically Within Member Groups This config specifies that within each `memberTypes` group, members are in an alphabetic case-sensitive order. -You can copy and paste the default order from [Default Configuration](#default-configuration). +The default member order will be applied if `memberTypes` is not specified. +You can see the default order in [Default Configuration](#default-configuration). ```jsonc // .eslintrc.json @@ -802,9 +805,6 @@ You can copy and paste the default order from [Default Configuration](#default-c "error", { "default": { - "memberTypes": [ - /* */ - ], "order": "alphabetically" } } @@ -817,7 +817,7 @@ You can copy and paste the default order from [Default Configuration](#default-c ##### ❌ Incorrect -```ts option='{"default":{"memberTypes":["signature","call-signature","public-static-field","protected-static-field","private-static-field","#private-static-field","public-decorated-field","protected-decorated-field","private-decorated-field","public-instance-field","protected-instance-field","private-instance-field","#private-instance-field","public-abstract-field","protected-abstract-field","public-field","protected-field","private-field","#private-field","static-field","instance-field","abstract-field","decorated-field","field","static-initialization","public-constructor","protected-constructor","private-constructor","constructor","public-static-get","protected-static-get","private-static-get","#private-static-get","public-decorated-get","protected-decorated-get","private-decorated-get","public-instance-get","protected-instance-get","private-instance-get","#private-instance-get","public-abstract-get","protected-abstract-get","public-get","protected-get","private-get","#private-get","static-get","instance-get","abstract-get","decorated-get","get","public-static-set","protected-static-set","private-static-set","#private-static-set","public-decorated-set","protected-decorated-set","private-decorated-set","public-instance-set","protected-instance-set","private-instance-set","#private-instance-set","public-abstract-set","protected-abstract-set","public-set","protected-set","private-set","#private-set","static-set","instance-set","abstract-set","decorated-set","set","public-static-method","protected-static-method","private-static-method","#private-static-method","public-decorated-method","protected-decorated-method","private-decorated-method","public-instance-method","protected-instance-method","private-instance-method","#private-instance-method","public-abstract-method","protected-abstract-method","public-method","protected-method","private-method","#private-method","static-method","instance-method","abstract-method","decorated-method","method"],"order":"alphabetically"}}' +```ts option='{"default":{"order":"alphabetically"}}' interface Foo { a: x; B: x; @@ -831,7 +831,7 @@ interface Foo { ##### ✅ Correct -```ts option='{"default":{"memberTypes":["signature","call-signature","public-static-field","protected-static-field","private-static-field","#private-static-field","public-decorated-field","protected-decorated-field","private-decorated-field","public-instance-field","protected-instance-field","private-instance-field","#private-instance-field","public-abstract-field","protected-abstract-field","public-field","protected-field","private-field","#private-field","static-field","instance-field","abstract-field","decorated-field","field","static-initialization","public-constructor","protected-constructor","private-constructor","constructor","public-static-get","protected-static-get","private-static-get","#private-static-get","public-decorated-get","protected-decorated-get","private-decorated-get","public-instance-get","protected-instance-get","private-instance-get","#private-instance-get","public-abstract-get","protected-abstract-get","public-get","protected-get","private-get","#private-get","static-get","instance-get","abstract-get","decorated-get","get","public-static-set","protected-static-set","private-static-set","#private-static-set","public-decorated-set","protected-decorated-set","private-decorated-set","public-instance-set","protected-instance-set","private-instance-set","#private-instance-set","public-abstract-set","protected-abstract-set","public-set","protected-set","private-set","#private-set","static-set","instance-set","abstract-set","decorated-set","set","public-static-method","protected-static-method","private-static-method","#private-static-method","public-decorated-method","protected-decorated-method","private-decorated-method","public-instance-method","protected-instance-method","private-instance-method","#private-instance-method","public-abstract-method","protected-abstract-method","public-method","protected-method","private-method","#private-method","static-method","instance-method","abstract-method","decorated-method","method"],"order":"alphabetically"}}' +```ts option='{"default":{"order":"alphabetically"}}' interface Foo { B: x; a: x; @@ -843,10 +843,62 @@ interface Foo { } ``` +#### Sorting Alphabetically Within Custom Member Groups + +This config specifies that within each custom `memberTypes` group, members are in an alphabetic case-sensitive order. + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { + "default": { + "memberTypes": ["method", "field"], + "order": "alphabetically" + } + } + ] + } +} +``` + + + +##### ❌ Incorrect + +```ts option='{"default":{"memberTypes":["method","field"],"order":"alphabetically"}}' +interface Foo { + B(): void; + c(): void; + a(): void; + + a: x; + B: x; + c: x; +} +``` + +##### ✅ Correct + +```ts option='{"default":{"memberTypes":["method","field"],"order":"alphabetically"}}' +interface Foo { + B(): void; + a(): void; + c(): void; + + B: x; + a: x; + c: x; +} +``` + #### Sorting Alphabetically Case Insensitive Within Member Groups This config specifies that within each `memberTypes` group, members are in an alphabetic case-insensitive order. -You can copy and paste the default order from [Default Configuration](#default-configuration). +The default member order will be applied if `memberTypes` is not specified. +You can see the default order in [Default Configuration](#default-configuration). ```jsonc // .eslintrc.json @@ -856,9 +908,6 @@ You can copy and paste the default order from [Default Configuration](#default-c "error", { "default": { - "memberTypes": [ - /* */ - ], "order": "alphabetically-case-insensitive" } } @@ -871,7 +920,7 @@ You can copy and paste the default order from [Default Configuration](#default-c ##### ❌ Incorrect -```ts option='{"default":{"memberTypes":["signature","call-signature","public-static-field","protected-static-field","private-static-field","#private-static-field","public-decorated-field","protected-decorated-field","private-decorated-field","public-instance-field","protected-instance-field","private-instance-field","#private-instance-field","public-abstract-field","protected-abstract-field","public-field","protected-field","private-field","#private-field","static-field","instance-field","abstract-field","decorated-field","field","static-initialization","public-constructor","protected-constructor","private-constructor","constructor","public-static-get","protected-static-get","private-static-get","#private-static-get","public-decorated-get","protected-decorated-get","private-decorated-get","public-instance-get","protected-instance-get","private-instance-get","#private-instance-get","public-abstract-get","protected-abstract-get","public-get","protected-get","private-get","#private-get","static-get","instance-get","abstract-get","decorated-get","get","public-static-set","protected-static-set","private-static-set","#private-static-set","public-decorated-set","protected-decorated-set","private-decorated-set","public-instance-set","protected-instance-set","private-instance-set","#private-instance-set","public-abstract-set","protected-abstract-set","public-set","protected-set","private-set","#private-set","static-set","instance-set","abstract-set","decorated-set","set","public-static-method","protected-static-method","private-static-method","#private-static-method","public-decorated-method","protected-decorated-method","private-decorated-method","public-instance-method","protected-instance-method","private-instance-method","#private-instance-method","public-abstract-method","protected-abstract-method","public-method","protected-method","private-method","#private-method","static-method","instance-method","abstract-method","decorated-method","method"],"order":"alphabetically-case-insensitive"}}' +```ts option='{"default":{"order":"alphabetically-case-insensitive"}}' interface Foo { B: x; a: x; @@ -885,7 +934,7 @@ interface Foo { ##### ✅ Correct -```ts option='{"default":{"memberTypes":["signature","call-signature","public-static-field","protected-static-field","private-static-field","#private-static-field","public-decorated-field","protected-decorated-field","private-decorated-field","public-instance-field","protected-instance-field","private-instance-field","#private-instance-field","public-abstract-field","protected-abstract-field","public-field","protected-field","private-field","#private-field","static-field","instance-field","abstract-field","decorated-field","field","static-initialization","public-constructor","protected-constructor","private-constructor","constructor","public-static-get","protected-static-get","private-static-get","#private-static-get","public-decorated-get","protected-decorated-get","private-decorated-get","public-instance-get","protected-instance-get","private-instance-get","#private-instance-get","public-abstract-get","protected-abstract-get","public-get","protected-get","private-get","#private-get","static-get","instance-get","abstract-get","decorated-get","get","public-static-set","protected-static-set","private-static-set","#private-static-set","public-decorated-set","protected-decorated-set","private-decorated-set","public-instance-set","protected-instance-set","private-instance-set","#private-instance-set","public-abstract-set","protected-abstract-set","public-set","protected-set","private-set","#private-set","static-set","instance-set","abstract-set","decorated-set","set","public-static-method","protected-static-method","private-static-method","#private-static-method","public-decorated-method","protected-decorated-method","private-decorated-method","public-instance-method","protected-instance-method","private-instance-method","#private-instance-method","public-abstract-method","protected-abstract-method","public-method","protected-method","private-method","#private-method","static-method","instance-method","abstract-method","decorated-method","method"],"order":"alphabetically-case-insensitive"}}' +```ts option='{"default":{"order":"alphabetically-case-insensitive"}}' interface Foo { a: x; B: x; diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index c404823dfd80..34fed637e6c8 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -70,7 +70,7 @@ type Order = AlphabeticalOrder | 'as-written'; interface SortedOrderConfig { memberTypes?: MemberType[] | 'never'; optionalityOrder?: OptionalityOrder; - order: Order; + order?: Order; } type OrderConfig = MemberType[] | SortedOrderConfig | 'never'; @@ -739,7 +739,9 @@ export default createRule({ }, defaultOptions: [ { - default: defaultOrder, + default: { + memberTypes: defaultOrder, + }, }, ], create(context, [options]) { diff --git a/packages/eslint-plugin/tests/rules/member-ordering.test.ts b/packages/eslint-plugin/tests/rules/member-ordering.test.ts index 47019dfe5ab5..6ebcb82e3aaa 100644 --- a/packages/eslint-plugin/tests/rules/member-ordering.test.ts +++ b/packages/eslint-plugin/tests/rules/member-ordering.test.ts @@ -1649,6 +1649,31 @@ class Foo { }, ], }, + { + name: 'default member types with alphabetically-case-insensitive order', + code: ` +// no accessibility === public +class Foo { + [A: string]: any; + [a: string]: any; + static C: boolean; + static d: boolean; + b: any; + B: any; + get e(): string {} + get E(): string {} + private imPrivate() {} + private ImPrivate() {} +} + `, + options: [ + { + default: { + order: 'alphabetically-case-insensitive', + }, + }, + ], + }, { code: ` class Foo { @@ -2032,6 +2057,46 @@ class Foo { }, ], }, + { + name: 'default member types with alphabetically order', + code: ` +// no accessibility === public +class Foo { + [A: string]: any; + [B: string]: any; + [a: string]: any; + [b: string]: any; + static C: boolean; + static d: boolean; + get E(): string {} + get e(): string {} + private ImPrivate() {} + private imPrivate() {} +} + `, + options: [ + { + default: { + order: 'alphabetically', + }, + }, + ], + }, + { + name: 'alphabetically order without member types', + code: ` +// no accessibility === public +interface Foo { + A: string; + B: string; + [Z: string]: any; + c(); + new (); + r(); +} + `, + options: [{ default: { memberTypes: 'never', order: 'alphabetically' } }], + }, { code: ` class Foo { @@ -4802,6 +4867,57 @@ class Foo { }, ], }, + { + name: 'default member types with alphabetically order', + code: ` +// no accessibility === public +class Foo { + static C: boolean; + [B: string]: any; + private A() {} +} + `, + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'B', + rank: 'public static field', + }, + line: 5, + column: 3, + }, + ], + options: [ + { + default: { + order: 'alphabetically', + }, + }, + ], + }, + { + name: 'alphabetically order without member types', + code: ` +// no accessibility === public +class Foo { + static C: boolean; + [B: string]: any; +} + `, + errors: [ + { + messageId: 'incorrectOrder', + data: { + member: 'B', + beforeMember: 'C', + }, + line: 5, + column: 3, + }, + ], + options: [{ default: { memberTypes: 'never', order: 'alphabetically' } }], + }, { name: '#private and private member order', code: ` From 03866c1a6a008e8636c0226fe40c2f716bf42f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Sun, 28 Jan 2024 02:21:13 -0500 Subject: [PATCH 078/165] docs: show all articles in sidebar, and a missing truncate (#8306) --- .../2022-12-05-asts-and-typescript-eslint.md | 2 ++ ...nt-type-exports-and-imports-why-and-how.md | 24 ++++++++++--------- packages/website/docusaurusConfig.ts | 3 +++ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md b/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md index 7e0bb8c43dee..8e15ac35bb3b 100644 --- a/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md +++ b/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md @@ -14,6 +14,8 @@ Programmers who work with tools like [ESLint](https://eslint.org) and [Prettier] But what is an AST, why is it useful for these kinds of tools, and how does that interact with ESLint and TypeScript tooling? Let's dig in! + + ## What's an AST? _Static analysis_ tools are those that look at code without running it. diff --git a/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md b/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md index 2135f6e3b3b5..5e0f1e02de58 100644 --- a/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md +++ b/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md @@ -16,7 +16,19 @@ They were added as part of the [ECMAScript Modules (ESM)](https://nodejs.org/api When writing TypeScript code with ESM, it can sometimes be desirable to import or export a type only in the type system. Code may wish to refer to a _type_, but not actually import or export a corresponding _value_. -For that purpose, TypeScript 3.8 [added type-only imports and exports](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) to the TypeScript language: +Type-only imports and exports are not emitted as runtime code when code is transpiled to JavaScript. +This brings up two questions: + +- Why would you want to use these type-only imports and exports? +- How can you enforce a project use them whenever necessary? + +Let's dig in! + + + +## Recap: Type-Only Imports and Exports + +TypeScript 3.8 [added type-only imports and exports](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) to the TypeScript language: ```ts import type { SomeThing } from './some-module.js'; @@ -41,16 +53,6 @@ TypeScript 4.5 also added [inline type qualifiers](https://www.typescriptlang.or import { type SomeType, SomeValue } from './some-module.js'; ``` -Type-only imports and exports are not emitted as runtime code when code is transpiled to JavaScript. -This brings up two questions: - -- Why would you want to use these type-only imports and exports? -- How can you enforce a project use them whenever necessary? - -Let's Dig In! - - - ## Benefits of Enforcing Type-only Imports/Exports ### Avoiding Unintentional Side Effects diff --git a/packages/website/docusaurusConfig.ts b/packages/website/docusaurusConfig.ts index cc283cfc2993..3b0f04dbe801 100644 --- a/packages/website/docusaurusConfig.ts +++ b/packages/website/docusaurusConfig.ts @@ -19,6 +19,9 @@ const beforeDefaultRemarkPlugins: MDXPlugin[] = [tabsPlugin]; const githubUrl = 'https://github.com/typescript-eslint/typescript-eslint'; const presetClassicOptions: PresetClassicOptions = { + blog: { + blogSidebarCount: 'ALL', + }, docs: { id: 'rules-docs', path: '../eslint-plugin/docs/rules', From 6dde5d0650ee490a57a1394f50166e892478e938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Sun, 28 Jan 2024 02:40:32 -0500 Subject: [PATCH 079/165] chore: enable prefer-nullish-coalescing internally (#7955) * chore: enable prefer-nullish-calescing internally * A couple complaints * One last complaint * Enable ignoreConditionalTests --- .eslintrc.js | 10 +++++++--- .../src/rules/padding-line-between-statements.ts | 2 +- packages/eslint-plugin/src/rules/unified-signatures.ts | 4 ++-- packages/rule-tester/src/utils/getRuleOptionsSchema.ts | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f4d869788ce9..1398b8f04d87 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -51,9 +51,6 @@ module.exports = { // make sure we're not leveraging any deprecated APIs 'deprecation/deprecation': 'error', - // TODO(#7338): Investigate enabling these soon ✨ - '@typescript-eslint/prefer-nullish-coalescing': 'off', - // TODO(#7130): Investigate changing these in or removing these from presets '@typescript-eslint/no-confusing-void-expression': 'off', '@typescript-eslint/prefer-string-starts-ends-with': 'off', @@ -109,6 +106,13 @@ module.exports = { 'error', { varsIgnorePattern: '^_', argsIgnorePattern: '^_' }, ], + '@typescript-eslint/prefer-nullish-coalescing': [ + 'error', + { + ignoreConditionalTests: true, + ignorePrimitives: true, + }, + ], // // Internal repo rules diff --git a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts index 4359cd5d0876..563bc8e99ec9 100644 --- a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts +++ b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts @@ -476,7 +476,7 @@ function verifyForAlways( } return true; }, - }) || nextNode; + }) ?? nextNode; const insertText = isTokenOnSameLine(prevToken, nextToken) ? '\n\n' : '\n'; diff --git a/packages/eslint-plugin/src/rules/unified-signatures.ts b/packages/eslint-plugin/src/rules/unified-signatures.ts index 0d4b8e8035d3..9b5edbe0afba 100644 --- a/packages/eslint-plugin/src/rules/unified-signatures.ts +++ b/packages/eslint-plugin/src/rules/unified-signatures.ts @@ -369,7 +369,7 @@ export default createRule({ } return typeContainsTypeParameter( - (type as Partial).typeAnnotation || + (type as Partial).typeAnnotation ?? (type as TSESTree.TSArrayType).elementType, ); } @@ -523,7 +523,7 @@ export default createRule({ key ??= getOverloadKey(signature); if ( currentScope && - (containingNode || signature).parent === currentScope.parent + (containingNode ?? signature).parent === currentScope.parent ) { const overloads = currentScope.overloads.get(key); if (overloads !== undefined) { diff --git a/packages/rule-tester/src/utils/getRuleOptionsSchema.ts b/packages/rule-tester/src/utils/getRuleOptionsSchema.ts index 1ff81d658e8e..f00ff1de6c94 100644 --- a/packages/rule-tester/src/utils/getRuleOptionsSchema.ts +++ b/packages/rule-tester/src/utils/getRuleOptionsSchema.ts @@ -33,5 +33,5 @@ export function getRuleOptionsSchema( } // Given a full schema, leave it alone - return schema || null; + return schema ?? null; } From 2ecc5e7b1168e7e8e743cdadf5f9d4ac5bdc97da Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Sun, 28 Jan 2024 10:42:34 +0300 Subject: [PATCH 080/165] fix(eslint-plugin): [prefer-nullish-coalescing] treat any/unknown as non-nullable (#8262) * fix(eslint-plugin): [prefer-nullish-coalescing] treat any/unknown as non-nullable * chore: rm unrelated changes * test: add declarations of 'y' variable --- .../src/rules/prefer-nullish-coalescing.ts | 4 ++-- .../tests/rules/prefer-nullish-coalescing.test.ts | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts index c688d75d2771..144aa08641b5 100644 --- a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts +++ b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts @@ -10,8 +10,8 @@ import { getTypeFlags, isLogicalOrOperator, isNodeEqual, - isNullableType, isNullLiteral, + isTypeFlagSet, isUndefinedIdentifier, nullThrows, NullThrowsReasons, @@ -309,7 +309,7 @@ export default createRule({ ): void { const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node); const type = checker.getTypeAtLocation(tsNode.left); - if (!isNullableType(type)) { + if (!isTypeFlagSet(type, ts.TypeFlags.Null | ts.TypeFlags.Undefined)) { return; } diff --git a/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts b/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts index 334754454f1c..c37a9431dae7 100644 --- a/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts @@ -222,6 +222,21 @@ x || y; `, options: [{ ignorePrimitives: true }], })), + ` + declare const x: any; + declare const y: number; + x || y; + `, + ` + declare const x: unknown; + declare const y: number; + x || y; + `, + ` + declare const x: never; + declare const y: number; + x || y; + `, ], invalid: [ ...nullishTypeInvalidTest((nullish, type) => ({ From db2df2482d7e54a177ed1d3aee25d86cd64a01c5 Mon Sep 17 00:00:00 2001 From: StyleShit <32631382+StyleShit@users.noreply.github.com> Date: Mon, 29 Jan 2024 18:44:25 +0200 Subject: [PATCH 081/165] fix(eslint-plugin): [no-useless-template-literals] report Infinity & NaN (#8295) * fix(eslint-plugin): [no-useless-template-literals] report Infinity & NaN Closes #8294 * remove unnecessary tests --- .../src/rules/no-useless-template-literals.ts | 28 ++++++++++++++++--- .../no-useless-template-literals.test.ts | 26 +++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-useless-template-literals.ts b/packages/eslint-plugin/src/rules/no-useless-template-literals.ts index 394947ff9a32..e80216fd5cbf 100644 --- a/packages/eslint-plugin/src/rules/no-useless-template-literals.ts +++ b/packages/eslint-plugin/src/rules/no-useless-template-literals.ts @@ -53,6 +53,24 @@ export default createRule<[], MessageId>({ return isString(type); } + function isLiteral(expression: TSESTree.Expression): boolean { + return expression.type === AST_NODE_TYPES.Literal; + } + + function isInfinityIdentifier(expression: TSESTree.Expression): boolean { + return ( + expression.type === AST_NODE_TYPES.Identifier && + expression.name === 'Infinity' + ); + } + + function isNaNIdentifier(expression: TSESTree.Expression): boolean { + return ( + expression.type === AST_NODE_TYPES.Identifier && + expression.name === 'NaN' + ); + } + return { TemplateLiteral(node: TSESTree.TemplateLiteral): void { if (node.parent.type === AST_NODE_TYPES.TaggedTemplateExpression) { @@ -91,13 +109,15 @@ export default createRule<[], MessageId>({ return; } - const literalsOrUndefinedExpressions = node.expressions.filter( + const fixableExpressions = node.expressions.filter( (expression): expression is TSESTree.Literal | TSESTree.Identifier => - expression.type === AST_NODE_TYPES.Literal || - isUndefinedIdentifier(expression), + isLiteral(expression) || + isUndefinedIdentifier(expression) || + isInfinityIdentifier(expression) || + isNaNIdentifier(expression), ); - literalsOrUndefinedExpressions.forEach(expression => { + fixableExpressions.forEach(expression => { context.report({ node: expression, messageId: 'noUselessTemplateLiteral', diff --git a/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts b/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts index 0bbd79c15654..0653e2506505 100644 --- a/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts +++ b/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts @@ -280,6 +280,32 @@ ruleTester.run('no-useless-template-literals', rule, { ], }, + { + code: '`${Infinity}`;', + output: '`Infinity`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + line: 1, + column: 4, + endColumn: 12, + }, + ], + }, + + { + code: '`${NaN}`;', + output: '`NaN`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + line: 1, + column: 4, + endColumn: 7, + }, + ], + }, + { code: "`${'a'} ${'b'}`;", output: '`a b`;', From 2d45a504aa422158ef300ee53b8a0d83589f7785 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 11:50:05 -0500 Subject: [PATCH 082/165] chore(deps): update react (#8042) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5138bd091421..db2882313313 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5055,13 +5055,13 @@ __metadata: linkType: hard "@types/react@npm:^18.2.14": - version: 18.2.42 - resolution: "@types/react@npm:18.2.42" + version: 18.2.48 + resolution: "@types/react@npm:18.2.48" dependencies: "@types/prop-types": "*" "@types/scheduler": "*" csstype: ^3.0.2 - checksum: d2019afdf48303a3a598a97cc9dd2284e3c04b369e791f6ba3c33232b7f8645daff97b093a19f8b3ce75ac8a261b47552cb4513226ab16d843eb9443b0f91844 + checksum: c9ca43ed2995389b7e09492c24e6f911a8439bb8276dd17cc66a2fbebbf0b42daf7b2ad177043256533607c2ca644d7d928fdfce37a67af1f8646d2bac988900 languageName: node linkType: hard From ffa1a4938462d46664460219023340fc92d2d1f9 Mon Sep 17 00:00:00 2001 From: Edwin Kofler Date: Mon, 29 Jan 2024 08:54:03 -0800 Subject: [PATCH 083/165] chore(eslint-plugin): fix typos in schema definitions (#8311) chore: Fix typos in schema definitions --- packages/eslint-plugin/src/rules/class-methods-use-this.ts | 2 +- .../eslint-plugin/src/rules/explicit-module-boundary-types.ts | 2 +- .../tests/schema-snapshots/class-methods-use-this.shot | 4 ++-- .../schema-snapshots/explicit-module-boundary-types.shot | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/eslint-plugin/src/rules/class-methods-use-this.ts b/packages/eslint-plugin/src/rules/class-methods-use-this.ts index 6940f11a7ae8..42991c40f499 100644 --- a/packages/eslint-plugin/src/rules/class-methods-use-this.ts +++ b/packages/eslint-plugin/src/rules/class-methods-use-this.ts @@ -50,7 +50,7 @@ export default createRule({ }, ignoreOverrideMethods: { type: 'boolean', - description: 'Ingore members marked with the `override` modifier', + description: 'Ignore members marked with the `override` modifier', }, ignoreClassesThatImplementAnInterface: { oneOf: [ diff --git a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts index b0bcb7d442f8..092179f8187d 100644 --- a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts +++ b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts @@ -81,7 +81,7 @@ export default createRule({ }, allowTypedFunctionExpressions: { description: - 'Whether to ignore type annotations on the variable of a function expresion.', + 'Whether to ignore type annotations on the variable of a function expression.', type: 'boolean', }, }, diff --git a/packages/eslint-plugin/tests/schema-snapshots/class-methods-use-this.shot b/packages/eslint-plugin/tests/schema-snapshots/class-methods-use-this.shot index 97e773bac407..ccecd0a0f6a9 100644 --- a/packages/eslint-plugin/tests/schema-snapshots/class-methods-use-this.shot +++ b/packages/eslint-plugin/tests/schema-snapshots/class-methods-use-this.shot @@ -35,7 +35,7 @@ exports[`Rule schemas should be convertible to TS types for documentation purpos ] }, "ignoreOverrideMethods": { - "description": "Ingore members marked with the \`override\` modifier", + "description": "Ignore members marked with the \`override\` modifier", "type": "boolean" } }, @@ -60,7 +60,7 @@ type Options = [ | boolean /** Ignore only the public fields of classes that implement an interface */ | 'public-fields'; - /** Ingore members marked with the \`override\` modifier */ + /** Ignore members marked with the \`override\` modifier */ ignoreOverrideMethods?: boolean; }, ]; diff --git a/packages/eslint-plugin/tests/schema-snapshots/explicit-module-boundary-types.shot b/packages/eslint-plugin/tests/schema-snapshots/explicit-module-boundary-types.shot index cd004e5a22bf..aa3494b2c238 100644 --- a/packages/eslint-plugin/tests/schema-snapshots/explicit-module-boundary-types.shot +++ b/packages/eslint-plugin/tests/schema-snapshots/explicit-module-boundary-types.shot @@ -28,7 +28,7 @@ exports[`Rule schemas should be convertible to TS types for documentation purpos "type": "boolean" }, "allowTypedFunctionExpressions": { - "description": "Whether to ignore type annotations on the variable of a function expresion.", + "description": "Whether to ignore type annotations on the variable of a function expression.", "type": "boolean" } }, @@ -53,7 +53,7 @@ type Options = [ * You must still type the parameters of the function. */ allowHigherOrderFunctions?: boolean; - /** Whether to ignore type annotations on the variable of a function expresion. */ + /** Whether to ignore type annotations on the variable of a function expression. */ allowTypedFunctionExpressions?: boolean; /** An array of function/method names that will not have their arguments or return values checked. */ allowedNames?: string[]; From 08bc1907a7154415675854fa36cf8c2b55e4e4ff Mon Sep 17 00:00:00 2001 From: NanderTGA <65074195+NanderTGA@users.noreply.github.com> Date: Mon, 29 Jan 2024 17:55:00 +0100 Subject: [PATCH 084/165] chore: fix broken and outdated links (#8264) --- .github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml | 2 +- .github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml | 2 +- .../04-enhancement-new-base-rule-extension.yaml | 2 +- .github/ISSUE_TEMPLATE/07-enhancement-other.yaml | 2 +- .github/replies.yml | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml b/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml index 2ea82b2ad19e..6c808be0b1bd 100644 --- a/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml +++ b/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml @@ -14,7 +14,7 @@ body: options: - label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22enhancement%3A+plugin+rule+option%22) and found none that match my proposal. required: true - - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#supported-rules) and found no rules that match my proposal. + - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#rules) and found no rules that match my proposal. required: true - label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed. required: true diff --git a/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml b/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml index dd9bf8b0f1a1..3f2f96d7357d 100644 --- a/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml +++ b/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml @@ -14,7 +14,7 @@ body: options: - label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22enhancement%3A+new+plugin+rule%22) and found none that match my proposal. required: true - - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#supported-rules) and found no rules that match my proposal. + - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#rules) and found no rules that match my proposal. required: true - label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed. required: true diff --git a/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml b/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml index 28f6699b3fb7..f1e4a8fc3132 100644 --- a/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml +++ b/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml @@ -21,7 +21,7 @@ body: options: - label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22enhancement%3A+new+base+rule+extension%22) and found none that match my proposal. required: true - - label: I have searched the [current extension rule list](https://typescript-eslint.io/rules/#extension-rules) and found no rules that match my proposal. + - label: I have searched the [current extension rule list](https://typescript-eslint.io/rules/?=extension#rules) and found no rules that match my proposal. required: true - label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed. required: true diff --git a/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml b/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml index 2d586fc7c8ba..f383970cf440 100644 --- a/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml +++ b/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml @@ -13,7 +13,7 @@ body: options: - label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22enhancement%3A+plugin+rule+option%22) and found none that match my proposal. required: true - - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#supported-rules) and found no rules that match my proposal. + - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#rules) and found no rules that match my proposal. required: true - label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed. required: true diff --git a/.github/replies.yml b/.github/replies.yml index a10137241409..352c3fe57cf3 100644 --- a/.github/replies.yml +++ b/.github/replies.yml @@ -16,7 +16,7 @@ replies: \ name: Extension Rule - Reject Due to Enhancement - body: | - The fix has been merged to main, and will be released Monday, as per our [release schedule](https://github.com/typescript-eslint/typescript-eslint#versioning) + The fix has been merged to main, and will be released Monday, as per our [release schedule](https://typescript-eslint.io/users/releases/#latest) \ If you need it sooner, please try the `canary` tag on NPM. name: Fix Has Been Merged @@ -62,7 +62,7 @@ replies: Closing this PR as it's been stale for ~6 weeks without activity. Feel free to reopen @{{ author }} if you have time - but no worries if not! If anybody wants to drive it forward, please do post your own PR - and if you use this as a start, consider adding `Co-authored-by: @{{ author }}` at the end of your PR description. Thanks! 😊 name: Pruning Stale PR - body: | - As per [our contributing guidelines](https://github.com/typescript-eslint/typescript-eslint/blob/master/CONTRIBUTING.md#addressing-feedback-and-beyond) this PR is in the queue of PRs to reviewed, and will be reviewed when we are able. + As per [our contributing guidelines](https://typescript-eslint.io/contributing/pull-requests#addressing-feedback-and-beyond) this PR is in the queue of PRs to reviewed, and will be reviewed when we are able. \ This project is run by volunteer maintainers, so it might be a bit before we can find the time to get to it. name: Review Queue From 3b794444c913da35688bbffafaf8791c8cb0a30e Mon Sep 17 00:00:00 2001 From: James Browning Date: Tue, 30 Jan 2024 05:55:43 +1300 Subject: [PATCH 085/165] fix(eslint-plugin): [prefer-readonly] disable checking accessors (#8300) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Disable checking accessors for prefer-readonly * Granular accessor tests * Update packages/eslint-plugin/src/rules/prefer-readonly.ts * fix: formatting and || for isModifierFlagSet suggestion --------- Co-authored-by: Josh Goldberg ✨ --- .../src/rules/prefer-readonly.ts | 5 ++++- .../tests/rules/prefer-readonly.test.ts | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/prefer-readonly.ts b/packages/eslint-plugin/src/rules/prefer-readonly.ts index ea4ff0e1bc4c..faf8db39a55c 100644 --- a/packages/eslint-plugin/src/rules/prefer-readonly.ts +++ b/packages/eslint-plugin/src/rules/prefer-readonly.ts @@ -299,7 +299,10 @@ class ClassScope { tsutils.isModifierFlagSet(node, ts.ModifierFlags.Private) || node.name.kind === ts.SyntaxKind.PrivateIdentifier ) || - tsutils.isModifierFlagSet(node, ts.ModifierFlags.Readonly) || + tsutils.isModifierFlagSet( + node, + ts.ModifierFlags.Accessor | ts.ModifierFlags.Readonly, + ) || ts.isComputedPropertyName(node.name) ) { return; diff --git a/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts b/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts index 39262c6fbb4e..3b1c25e75f11 100644 --- a/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts @@ -717,6 +717,26 @@ class Foo { } } `, + ` + class TestStaticPrivateAccessor { + private static accessor staticAcc = 1; + } + `, + ` + class TestStaticPrivateFieldAccessor { + static accessor #staticAcc = 1; + } + `, + ` + class TestPrivateAccessor { + private accessor acc = 3; + } + `, + ` + class TestPrivateFieldAccessor { + accessor #acc = 3; + } + `, ], invalid: [ { From c9ceb9d1f56af6041844d233cd58a00ca26bc878 Mon Sep 17 00:00:00 2001 From: "typescript-eslint[bot]" Date: Mon, 29 Jan 2024 17:15:11 +0000 Subject: [PATCH 086/165] chore(release): publish 6.20.0 --- CHANGELOG.md | 24 ++++ packages/ast-spec/CHANGELOG.md | 6 + packages/ast-spec/package.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 6 + packages/eslint-plugin-internal/package.json | 10 +- packages/eslint-plugin-tslint/CHANGELOG.md | 6 + packages/eslint-plugin-tslint/package.json | 6 +- packages/eslint-plugin/CHANGELOG.md | 29 +++++ packages/eslint-plugin/package.json | 14 +-- packages/integration-tests/CHANGELOG.md | 6 + packages/integration-tests/package.json | 2 +- packages/parser/CHANGELOG.md | 6 + packages/parser/package.json | 10 +- packages/repo-tools/CHANGELOG.md | 6 + packages/repo-tools/package.json | 2 +- .../CHANGELOG.md | 6 + .../package.json | 6 +- packages/rule-tester/CHANGELOG.md | 6 + packages/rule-tester/package.json | 8 +- packages/scope-manager/CHANGELOG.md | 6 + packages/scope-manager/package.json | 8 +- packages/type-utils/CHANGELOG.md | 6 + packages/type-utils/package.json | 8 +- packages/types/CHANGELOG.md | 6 + packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 6 + packages/typescript-estree/package.json | 6 +- packages/utils/CHANGELOG.md | 6 + packages/utils/package.json | 10 +- packages/visitor-keys/CHANGELOG.md | 6 + packages/visitor-keys/package.json | 4 +- packages/website-eslint/CHANGELOG.md | 6 + packages/website-eslint/package.json | 16 +-- packages/website/CHANGELOG.md | 6 + packages/website/package.json | 12 +- yarn.lock | 114 +++++++++--------- 36 files changed, 269 insertions(+), 120 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ba4d93cad77..088f152496b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +## 6.20.0 (2024-01-29) + + +### 🚀 Features + +- **eslint-plugin:** [member-ordering] allow easy reuse of the default ordering ([#8248](https://github.com/typescript-eslint/typescript-eslint/pull/8248)) + +### 🩹 Fixes + +- **eslint-plugin:** [no-useless-template-literals] incorrect bigint autofix result ([#8283](https://github.com/typescript-eslint/typescript-eslint/pull/8283)) +- **eslint-plugin:** [prefer-nullish-coalescing] treat any/unknown as non-nullable ([#8262](https://github.com/typescript-eslint/typescript-eslint/pull/8262)) +- **eslint-plugin:** [no-useless-template-literals] report Infinity & NaN ([#8295](https://github.com/typescript-eslint/typescript-eslint/pull/8295)) +- **eslint-plugin:** [prefer-readonly] disable checking accessors ([#8300](https://github.com/typescript-eslint/typescript-eslint/pull/8300)) + +### ❤️ Thank You + +- Alex Parloti @parloti +- auvred @auvred +- James Browning +- StyleShit @StyleShit +- YeonJuan @yeonjuan + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index aaf0e9f4566e..f074d88c84ee 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for ast-spec to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for ast-spec to align it with other projects, there were no code changes. diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 565734c9c5ca..4919b30dbe16 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "6.19.1", + "version": "6.20.0", "description": "Complete specification for the TypeScript-ESTree AST", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 76c8d7f3786b..9987d209069c 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 394dd5ac8b1f..06347f372c2c 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "6.19.1", + "version": "6.20.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,10 +14,10 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/rule-tester": "6.19.1", - "@typescript-eslint/scope-manager": "6.19.1", - "@typescript-eslint/type-utils": "6.19.1", - "@typescript-eslint/utils": "6.19.1", + "@typescript-eslint/rule-tester": "6.20.0", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/type-utils": "6.20.0", + "@typescript-eslint/utils": "6.20.0", "prettier": "^3.0.3" }, "devDependencies": { diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index d6803a2ae82d..41595443e428 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for eslint-plugin-tslint to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for eslint-plugin-tslint to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 4cde53c4a132..24e236920088 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "6.19.1", + "version": "6.20.0", "main": "dist/index.js", "typings": "src/index.ts", "description": "ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint", @@ -46,7 +46,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "6.19.1" + "@typescript-eslint/utils": "6.20.0" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0", @@ -55,7 +55,7 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "6.19.1", + "@typescript-eslint/parser": "6.20.0", "jest": "29.7.0", "prettier": "^3.0.3", "rimraf": "*" diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index ac21a7141869..1dda2647a499 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,3 +1,32 @@ +## 6.20.0 (2024-01-29) + + +### 🚀 Features + +- **eslint-plugin:** [member-ordering] allow easy reuse of the default ordering + + +### 🩹 Fixes + +- **eslint-plugin:** [no-useless-template-literals] incorrect bigint autofix result + +- **eslint-plugin:** [prefer-nullish-coalescing] treat any/unknown as non-nullable + +- **eslint-plugin:** [no-useless-template-literals] report Infinity & NaN + +- **eslint-plugin:** [prefer-readonly] disable checking accessors + + +### ❤️ Thank You + +- Alex Parloti +- auvred +- James Browning +- StyleShit +- YeonJuan + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 04800761b834..c10641310051 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "6.19.1", + "version": "6.20.0", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -57,10 +57,10 @@ }, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.19.1", - "@typescript-eslint/type-utils": "6.19.1", - "@typescript-eslint/utils": "6.19.1", - "@typescript-eslint/visitor-keys": "6.19.1", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/type-utils": "6.20.0", + "@typescript-eslint/utils": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -73,8 +73,8 @@ "@types/debug": "*", "@types/marked": "*", "@types/natural-compare": "*", - "@typescript-eslint/rule-schema-to-typescript-types": "6.19.1", - "@typescript-eslint/rule-tester": "6.19.1", + "@typescript-eslint/rule-schema-to-typescript-types": "6.20.0", + "@typescript-eslint/rule-tester": "6.20.0", "ajv": "^6.12.6", "chalk": "^5.3.0", "cross-fetch": "*", diff --git a/packages/integration-tests/CHANGELOG.md b/packages/integration-tests/CHANGELOG.md index e0bd38b1bf57..ba8e54fa00ac 100644 --- a/packages/integration-tests/CHANGELOG.md +++ b/packages/integration-tests/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for integration-tests to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for integration-tests to align it with other projects, there were no code changes. diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index f10c71fbe117..468aa5a844b4 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/integration-tests", - "version": "6.19.1", + "version": "6.20.0", "private": true, "scripts": { "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 88aa48e06499..b45909752734 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for parser to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for parser to align it with other projects, there were no code changes. diff --git a/packages/parser/package.json b/packages/parser/package.json index 1a68fac66293..4e337c40ee35 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "6.19.1", + "version": "6.20.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "files": [ "dist", @@ -51,10 +51,10 @@ "eslint": "^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "6.19.1", - "@typescript-eslint/types": "6.19.1", - "@typescript-eslint/typescript-estree": "6.19.1", - "@typescript-eslint/visitor-keys": "6.19.1", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index ffbaa2c4bb7e..7684d33a68a2 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for repo-tools to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for repo-tools to align it with other projects, there were no code changes. diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index d3fa46e2eee3..e791791d6d9b 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/repo-tools", - "version": "6.19.1", + "version": "6.20.0", "private": true, "scripts": { "//": "NOTE: intentionally no build step in this package", diff --git a/packages/rule-schema-to-typescript-types/CHANGELOG.md b/packages/rule-schema-to-typescript-types/CHANGELOG.md index 31d14f226f38..1fb5c4f9b06f 100644 --- a/packages/rule-schema-to-typescript-types/CHANGELOG.md +++ b/packages/rule-schema-to-typescript-types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index aec08d59afa2..c4d76eb4ec13 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-schema-to-typescript-types", - "version": "6.19.1", + "version": "6.20.0", "private": true, "type": "commonjs", "exports": { @@ -34,8 +34,8 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/type-utils": "6.19.1", - "@typescript-eslint/utils": "6.19.1", + "@typescript-eslint/type-utils": "6.20.0", + "@typescript-eslint/utils": "6.20.0", "natural-compare": "^1.4.0", "prettier": "^3.0.3" }, diff --git a/packages/rule-tester/CHANGELOG.md b/packages/rule-tester/CHANGELOG.md index c2b3ca916d7a..b8103de73e2b 100644 --- a/packages/rule-tester/CHANGELOG.md +++ b/packages/rule-tester/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for rule-tester to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for rule-tester to align it with other projects, there were no code changes. diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index e99f75099698..c2cfbe6ab2ec 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-tester", - "version": "6.19.1", + "version": "6.20.0", "description": "Tooling to test ESLint rules", "files": [ "dist", @@ -47,8 +47,8 @@ }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { - "@typescript-eslint/typescript-estree": "6.19.1", - "@typescript-eslint/utils": "6.19.1", + "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/utils": "6.20.0", "ajv": "^6.10.0", "lodash.merge": "4.6.2", "semver": "^7.5.4" @@ -59,7 +59,7 @@ }, "devDependencies": { "@types/lodash.merge": "4.6.9", - "@typescript-eslint/parser": "6.19.1", + "@typescript-eslint/parser": "6.20.0", "chai": "^4.3.7", "mocha": "^10.0.0", "sinon": "^16.0.0", diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 3f28bdd40218..e1aace5de4c4 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for scope-manager to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for scope-manager to align it with other projects, there were no code changes. diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index ce447d544b09..65848a158e44 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "6.19.1", + "version": "6.20.0", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -44,13 +44,13 @@ "typecheck": "npx nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "6.19.1", - "@typescript-eslint/visitor-keys": "6.19.1" + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0" }, "devDependencies": { "@prettier/sync": "*", "@types/glob": "*", - "@typescript-eslint/typescript-estree": "6.19.1", + "@typescript-eslint/typescript-estree": "6.20.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index 5add03e038f6..1dd061652d95 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for type-utils to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 40bb807c187a..b0fd360c091a 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "6.19.1", + "version": "6.20.0", "description": "Type utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -45,13 +45,13 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "6.19.1", - "@typescript-eslint/utils": "6.19.1", + "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/utils": "6.20.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "devDependencies": { - "@typescript-eslint/parser": "6.19.1", + "@typescript-eslint/parser": "6.20.0", "ajv": "^6.10.0", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 71e200aa690d..7366b2ac2e2a 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for types to align it with other projects, there were no code changes. diff --git a/packages/types/package.json b/packages/types/package.json index ffe604a3beab..b1f9da3d3532 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "6.19.1", + "version": "6.20.0", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 8fef02eac6ec..6931645a22f1 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for typescript-estree to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for typescript-estree to align it with other projects, there were no code changes. diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index a250df8f0bc9..61990bc01979 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "6.19.1", + "version": "6.20.0", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "files": [ "dist", @@ -52,8 +52,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.19.1", - "@typescript-eslint/visitor-keys": "6.19.1", + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index a446dfdfec02..6b57bb6e8eab 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for utils to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for utils to align it with other projects, there were no code changes. diff --git a/packages/utils/package.json b/packages/utils/package.json index 84a88ffc53b6..d0e7c0c25acd 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "6.19.1", + "version": "6.20.0", "description": "Utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -68,16 +68,16 @@ "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.19.1", - "@typescript-eslint/types": "6.19.1", - "@typescript-eslint/typescript-estree": "6.19.1", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/typescript-estree": "6.20.0", "semver": "^7.5.4" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { - "@typescript-eslint/parser": "6.19.1", + "@typescript-eslint/parser": "6.20.0", "downlevel-dts": "*", "jest": "29.7.0", "prettier": "^3.0.3", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 25dd6ea911ce..fc174105863a 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for visitor-keys to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index b35a7886c91a..caebea3803fc 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "6.19.1", + "version": "6.20.0", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "files": [ "dist", @@ -45,7 +45,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.19.1", + "@typescript-eslint/types": "6.20.0", "eslint-visitor-keys": "^3.4.1" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index b8d2b86118a1..f0a4c4dc7f66 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for website-eslint to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for website-eslint to align it with other projects, there were no code changes. diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index ebee17153dce..ecd3a502b886 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "6.19.1", + "version": "6.20.0", "private": true, "description": "ESLint which works in browsers.", "files": [ @@ -23,16 +23,16 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.19.1", - "@typescript-eslint/utils": "6.19.1" + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/utils": "6.20.0" }, "devDependencies": { "@eslint/js": "8.56.0", - "@typescript-eslint/eslint-plugin": "6.19.1", - "@typescript-eslint/parser": "6.19.1", - "@typescript-eslint/scope-manager": "6.19.1", - "@typescript-eslint/typescript-estree": "6.19.1", - "@typescript-eslint/visitor-keys": "6.19.1", + "@typescript-eslint/eslint-plugin": "6.20.0", + "@typescript-eslint/parser": "6.20.0", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0", "esbuild": "~0.19.0", "eslint": "*", "esquery": "*", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index 26edbcf98fac..7c5f8dfe31fd 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for website to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 6.19.1 (2024-01-22) This was a version bump only for website to align it with other projects, there were no code changes. diff --git a/packages/website/package.json b/packages/website/package.json index 5b55982f1fa3..4e44898dd98e 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "6.19.1", + "version": "6.20.0", "private": true, "scripts": { "build": "docusaurus build", @@ -24,8 +24,8 @@ "@docusaurus/theme-common": "~2.4.1", "@mdx-js/react": "1.6.22", "@prettier/sync": "*", - "@typescript-eslint/parser": "6.19.1", - "@typescript-eslint/website-eslint": "6.19.1", + "@typescript-eslint/parser": "6.20.0", + "@typescript-eslint/website-eslint": "6.20.0", "clsx": "^2.0.0", "eslint": "*", "json-schema": "^0.4.0", @@ -50,9 +50,9 @@ "@types/react": "*", "@types/react-helmet": "^6.1.6", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "6.19.1", - "@typescript-eslint/rule-schema-to-typescript-types": "6.19.1", - "@typescript-eslint/types": "6.19.1", + "@typescript-eslint/eslint-plugin": "6.20.0", + "@typescript-eslint/rule-schema-to-typescript-types": "6.20.0", + "@typescript-eslint/types": "6.20.0", "copy-webpack-plugin": "^11.0.0", "cross-fetch": "*", "globby": "^11.1.0", diff --git a/yarn.lock b/yarn.lock index db2882313313..4ad56931c684 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5221,10 +5221,10 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-internal@workspace:packages/eslint-plugin-internal" dependencies: "@prettier/sync": "*" - "@typescript-eslint/rule-tester": 6.19.1 - "@typescript-eslint/scope-manager": 6.19.1 - "@typescript-eslint/type-utils": 6.19.1 - "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/rule-tester": 6.20.0 + "@typescript-eslint/scope-manager": 6.20.0 + "@typescript-eslint/type-utils": 6.20.0 + "@typescript-eslint/utils": 6.20.0 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5236,8 +5236,8 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-tslint@workspace:packages/eslint-plugin-tslint" dependencies: "@types/lodash": "*" - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/utils": 6.20.0 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5248,7 +5248,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/eslint-plugin@6.19.1, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": +"@typescript-eslint/eslint-plugin@6.20.0, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": version: 0.0.0-use.local resolution: "@typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin" dependencies: @@ -5257,12 +5257,12 @@ __metadata: "@types/debug": "*" "@types/marked": "*" "@types/natural-compare": "*" - "@typescript-eslint/rule-schema-to-typescript-types": 6.19.1 - "@typescript-eslint/rule-tester": 6.19.1 - "@typescript-eslint/scope-manager": 6.19.1 - "@typescript-eslint/type-utils": 6.19.1 - "@typescript-eslint/utils": 6.19.1 - "@typescript-eslint/visitor-keys": 6.19.1 + "@typescript-eslint/rule-schema-to-typescript-types": 6.20.0 + "@typescript-eslint/rule-tester": 6.20.0 + "@typescript-eslint/scope-manager": 6.20.0 + "@typescript-eslint/type-utils": 6.20.0 + "@typescript-eslint/utils": 6.20.0 + "@typescript-eslint/visitor-keys": 6.20.0 ajv: ^6.12.6 chalk: ^5.3.0 cross-fetch: "*" @@ -5301,15 +5301,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@6.19.1, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@6.20.0, @typescript-eslint/parser@workspace:packages/parser": version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: "@types/glob": "*" - "@typescript-eslint/scope-manager": 6.19.1 - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 - "@typescript-eslint/visitor-keys": 6.19.1 + "@typescript-eslint/scope-manager": 6.20.0 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 + "@typescript-eslint/visitor-keys": 6.20.0 debug: ^4.3.4 downlevel-dts: "*" glob: "*" @@ -5341,26 +5341,26 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/rule-schema-to-typescript-types@6.19.1, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": +"@typescript-eslint/rule-schema-to-typescript-types@6.20.0, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types" dependencies: "@prettier/sync": "*" - "@typescript-eslint/type-utils": 6.19.1 - "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/type-utils": 6.20.0 + "@typescript-eslint/utils": 6.20.0 natural-compare: ^1.4.0 prettier: ^3.0.3 languageName: unknown linkType: soft -"@typescript-eslint/rule-tester@6.19.1, @typescript-eslint/rule-tester@workspace:packages/rule-tester": +"@typescript-eslint/rule-tester@6.20.0, @typescript-eslint/rule-tester@workspace:packages/rule-tester": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-tester@workspace:packages/rule-tester" dependencies: "@types/lodash.merge": 4.6.9 - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 - "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 + "@typescript-eslint/utils": 6.20.0 ajv: ^6.10.0 chai: ^4.3.7 lodash.merge: 4.6.2 @@ -5374,15 +5374,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/scope-manager@6.19.1, @typescript-eslint/scope-manager@workspace:packages/scope-manager": +"@typescript-eslint/scope-manager@6.20.0, @typescript-eslint/scope-manager@workspace:packages/scope-manager": version: 0.0.0-use.local resolution: "@typescript-eslint/scope-manager@workspace:packages/scope-manager" dependencies: "@prettier/sync": "*" "@types/glob": "*" - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 - "@typescript-eslint/visitor-keys": 6.19.1 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 + "@typescript-eslint/visitor-keys": 6.20.0 glob: "*" jest-specific-snapshot: "*" make-dir: "*" @@ -5401,13 +5401,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@6.19.1, @typescript-eslint/type-utils@workspace:packages/type-utils": +"@typescript-eslint/type-utils@6.20.0, @typescript-eslint/type-utils@workspace:packages/type-utils": version: 0.0.0-use.local resolution: "@typescript-eslint/type-utils@workspace:packages/type-utils" dependencies: - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 - "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 + "@typescript-eslint/utils": 6.20.0 ajv: ^6.10.0 debug: ^4.3.4 downlevel-dts: "*" @@ -5424,7 +5424,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/types@6.19.1, @typescript-eslint/types@workspace:packages/types": +"@typescript-eslint/types@6.20.0, @typescript-eslint/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: @@ -5515,14 +5515,14 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/typescript-estree@6.19.1, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": +"@typescript-eslint/typescript-estree@6.20.0, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": version: 0.0.0-use.local resolution: "@typescript-eslint/typescript-estree@workspace:packages/typescript-estree" dependencies: "@babel/code-frame": "*" "@babel/parser": "*" - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/visitor-keys": 6.19.1 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/visitor-keys": 6.20.0 debug: ^4.3.4 glob: "*" globby: ^11.1.0 @@ -5561,17 +5561,17 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@6.19.1, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": +"@typescript-eslint/utils@6.20.0, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": version: 0.0.0-use.local resolution: "@typescript-eslint/utils@workspace:packages/utils" dependencies: "@eslint-community/eslint-utils": ^4.4.0 "@types/json-schema": ^7.0.12 "@types/semver": ^7.5.0 - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/scope-manager": 6.19.1 - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/scope-manager": 6.20.0 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.0.3 @@ -5601,12 +5601,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@6.19.1, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": +"@typescript-eslint/visitor-keys@6.20.0, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": version: 0.0.0-use.local resolution: "@typescript-eslint/visitor-keys@workspace:packages/visitor-keys" dependencies: "@types/eslint-visitor-keys": "*" - "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/types": 6.20.0 downlevel-dts: "*" eslint-visitor-keys: ^3.4.1 jest: 29.7.0 @@ -5626,18 +5626,18 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/website-eslint@6.19.1, @typescript-eslint/website-eslint@workspace:packages/website-eslint": +"@typescript-eslint/website-eslint@6.20.0, @typescript-eslint/website-eslint@workspace:packages/website-eslint": version: 0.0.0-use.local resolution: "@typescript-eslint/website-eslint@workspace:packages/website-eslint" dependencies: "@eslint/js": 8.56.0 - "@typescript-eslint/eslint-plugin": 6.19.1 - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/scope-manager": 6.19.1 - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 - "@typescript-eslint/utils": 6.19.1 - "@typescript-eslint/visitor-keys": 6.19.1 + "@typescript-eslint/eslint-plugin": 6.20.0 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/scope-manager": 6.20.0 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 + "@typescript-eslint/utils": 6.20.0 + "@typescript-eslint/visitor-keys": 6.20.0 esbuild: ~0.19.0 eslint: "*" esquery: "*" @@ -18863,11 +18863,11 @@ __metadata: "@types/react": "*" "@types/react-helmet": ^6.1.6 "@types/react-router-dom": ^5.3.3 - "@typescript-eslint/eslint-plugin": 6.19.1 - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/rule-schema-to-typescript-types": 6.19.1 - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/website-eslint": 6.19.1 + "@typescript-eslint/eslint-plugin": 6.20.0 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/rule-schema-to-typescript-types": 6.20.0 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/website-eslint": 6.20.0 clsx: ^2.0.0 copy-webpack-plugin: ^11.0.0 cross-fetch: "*" From 1bc3c97d64785c9172a58e4b81bff8d22b72c9ff Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:16:37 +0300 Subject: [PATCH 087/165] chore(eslint-plugin): [no-unused-vars] remove unused nested TSModuleDeclaration rule listener (#8279) --- .../eslint-plugin/src/rules/no-unused-vars.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unused-vars.ts b/packages/eslint-plugin/src/rules/no-unused-vars.ts index be8fcbe337e5..a0094bee811d 100644 --- a/packages/eslint-plugin/src/rules/no-unused-vars.ts +++ b/packages/eslint-plugin/src/rules/no-unused-vars.ts @@ -312,23 +312,6 @@ export default createRule({ markDeclarationChildAsUsed(node); }, - // module declaration in module declaration should not report unused vars error - // this is workaround as this change should be done in better way - 'TSModuleDeclaration > TSModuleDeclaration'( - node: TSESTree.TSModuleDeclaration, - ): void { - if (node.id.type === AST_NODE_TYPES.Identifier) { - let scope = getScope(context); - if (scope.upper) { - scope = scope.upper; - } - const superVar = scope.set.get(node.id.name); - if (superVar) { - superVar.eslintUsed = true; - } - } - }, - // children of a namespace that is a child of a declared namespace are auto-exported [ambientDeclarationSelector( 'TSModuleDeclaration[declare = true] > TSModuleBlock TSModuleDeclaration > TSModuleBlock', From bb907e297f18556fd19ebc9f52e5b4c3efe0bc89 Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:16:51 +0300 Subject: [PATCH 088/165] fix(eslint-plugin): [no-unused-vars] don't report on types referenced in export assignment expression (#8265) --- .../no-unused-vars/no-unused-vars.test.ts | 73 +++++++++++++++++++ .../src/referencer/ExportVisitor.ts | 12 ++- .../src/referencer/Referencer.ts | 4 + .../tests/fixtures/export/equals1.ts.shot | 2 +- .../tests/fixtures/export/equals3-type.ts | 4 + .../fixtures/export/equals3-type.ts.shot | 49 +++++++++++++ 6 files changed, 141 insertions(+), 3 deletions(-) create mode 100644 packages/scope-manager/tests/fixtures/export/equals3-type.ts create mode 100644 packages/scope-manager/tests/fixtures/export/equals3-type.ts.shot diff --git a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts index baed3954060c..5d39c2a2610e 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts @@ -1111,6 +1111,37 @@ foo &&= 2; let foo = 1; foo ||= 2; `, + ` +const foo = 1; +export = foo; + `, + ` +const Foo = 1; +interface Foo { + bar: string; +} +export = Foo; + `, + ` +interface Foo { + bar: string; +} +export = Foo; + `, + ` +type Foo = 1; +export = Foo; + `, + ` +type Foo = 1; +export = {} as Foo; + `, + ` +declare module 'foo' { + type Foo = 1; + export = Foo; +} + `, ], invalid: [ @@ -1874,5 +1905,47 @@ foo += 1; }, ], }, + { + code: ` +interface Foo { + bar: string; +} +type Bar = 1; +export = Bar; + `, + errors: [ + { + messageId: 'unusedVar', + line: 2, + column: 11, + data: { + varName: 'Foo', + action: 'defined', + additional: '', + }, + }, + ], + }, + { + code: ` +interface Foo { + bar: string; +} +type Bar = 1; +export = Foo; + `, + errors: [ + { + messageId: 'unusedVar', + line: 5, + column: 6, + data: { + varName: 'Bar', + action: 'defined', + additional: '', + }, + }, + ], + }, ], }); diff --git a/packages/scope-manager/src/referencer/ExportVisitor.ts b/packages/scope-manager/src/referencer/ExportVisitor.ts index 1af3a81ca2c6..24d35b49dab2 100644 --- a/packages/scope-manager/src/referencer/ExportVisitor.ts +++ b/packages/scope-manager/src/referencer/ExportVisitor.ts @@ -7,7 +7,8 @@ import { Visitor } from './Visitor'; type ExportNode = | TSESTree.ExportAllDeclaration | TSESTree.ExportDefaultDeclaration - | TSESTree.ExportNamedDeclaration; + | TSESTree.ExportNamedDeclaration + | TSESTree.TSExportAssignment; class ExportVisitor extends Visitor { readonly #referencer: Referencer; @@ -25,7 +26,10 @@ class ExportVisitor extends Visitor { } protected Identifier(node: TSESTree.Identifier): void { - if (this.#exportNode.exportKind === 'type') { + if ( + this.#exportNode.type !== AST_NODE_TYPES.TSExportAssignment && + this.#exportNode.exportKind === 'type' + ) { // export type { T }; // type exports can only reference types this.#referencer.currentScope().referenceType(node); @@ -49,6 +53,10 @@ class ExportVisitor extends Visitor { } } + protected TSExportAssignment(node: TSESTree.TSExportAssignment): void { + this.visit(node.expression); + } + protected ExportNamedDeclaration( node: TSESTree.ExportNamedDeclaration, ): void { diff --git a/packages/scope-manager/src/referencer/Referencer.ts b/packages/scope-manager/src/referencer/Referencer.ts index f5d36f2fa0ba..ddbdf7c61a4c 100644 --- a/packages/scope-manager/src/referencer/Referencer.ts +++ b/packages/scope-manager/src/referencer/Referencer.ts @@ -443,6 +443,10 @@ class Referencer extends Visitor { } } + protected TSExportAssignment(node: TSESTree.TSExportAssignment): void { + ExportVisitor.visit(this, node); + } + protected ExportNamedDeclaration( node: TSESTree.ExportNamedDeclaration, ): void { diff --git a/packages/scope-manager/tests/fixtures/export/equals1.ts.shot b/packages/scope-manager/tests/fixtures/export/equals1.ts.shot index 729abd96f92f..a4afe31abc8c 100644 --- a/packages/scope-manager/tests/fixtures/export/equals1.ts.shot +++ b/packages/scope-manager/tests/fixtures/export/equals1.ts.shot @@ -26,7 +26,7 @@ ScopeManager { Reference$2 { identifier: Identifier<"x">, isRead: true, - isTypeReference: false, + isTypeReference: true, isValueReference: true, isWrite: false, resolved: Variable$2, diff --git a/packages/scope-manager/tests/fixtures/export/equals3-type.ts b/packages/scope-manager/tests/fixtures/export/equals3-type.ts new file mode 100644 index 000000000000..a894a6341de0 --- /dev/null +++ b/packages/scope-manager/tests/fixtures/export/equals3-type.ts @@ -0,0 +1,4 @@ +interface Foo { + bar: 1; +} +export = Foo; diff --git a/packages/scope-manager/tests/fixtures/export/equals3-type.ts.shot b/packages/scope-manager/tests/fixtures/export/equals3-type.ts.shot new file mode 100644 index 000000000000..49ebdfb950af --- /dev/null +++ b/packages/scope-manager/tests/fixtures/export/equals3-type.ts.shot @@ -0,0 +1,49 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`export equals3-type 1`] = ` +ScopeManager { + variables: [ + ImplicitGlobalConstTypeVariable, + Variable$2 { + defs: [ + TypeDefinition$1 { + name: Identifier<"Foo">, + node: TSInterfaceDeclaration$1, + }, + ], + name: "Foo", + references: [ + Reference$1 { + identifier: Identifier<"Foo">, + isRead: true, + isTypeReference: true, + isValueReference: true, + isWrite: false, + resolved: Variable$2, + }, + ], + isValueVariable: false, + isTypeVariable: true, + }, + ], + scopes: [ + GlobalScope$1 { + block: Program$2, + isStrict: false, + references: [ + Reference$1, + ], + set: Map { + "const" => ImplicitGlobalConstTypeVariable, + "Foo" => Variable$2, + }, + type: "global", + upper: null, + variables: [ + ImplicitGlobalConstTypeVariable, + Variable$2, + ], + }, + ], +} +`; From 33b974d6d262c017cefd49429808fa4db5758efc Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:18:16 +0300 Subject: [PATCH 089/165] docs(eslint-plugin): remove `fixable` and `hasSuggestions` from rules that don't provide them (#8253) --- packages/eslint-plugin/src/rules/class-methods-use-this.ts | 2 -- .../eslint-plugin/src/rules/no-confusing-non-null-assertion.ts | 1 - 2 files changed, 3 deletions(-) diff --git a/packages/eslint-plugin/src/rules/class-methods-use-this.ts b/packages/eslint-plugin/src/rules/class-methods-use-this.ts index 42991c40f499..d6240415b066 100644 --- a/packages/eslint-plugin/src/rules/class-methods-use-this.ts +++ b/packages/eslint-plugin/src/rules/class-methods-use-this.ts @@ -28,8 +28,6 @@ export default createRule({ extendsBaseRule: true, requiresTypeChecking: false, }, - fixable: 'code', - hasSuggestions: false, schema: [ { type: 'object', diff --git a/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts b/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts index e54c5f1db2a1..76e60100422c 100644 --- a/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts @@ -13,7 +13,6 @@ export default createRule({ 'Disallow non-null assertion in locations that may be confusing', recommended: 'stylistic', }, - fixable: 'code', hasSuggestions: true, messages: { confusingEqual: From b56976e7c10e8536605f1332be42654d419a9e1c Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:21:39 +0300 Subject: [PATCH 090/165] feat(typescript-estree): forbid duplicated accessibility modifiers (#8257) --- .../fixture.ts | 3 +++ .../snapshots/1-TSESTree-Error.shot | 10 +++++++++ .../snapshots/2-Babel-Error.shot | 3 +++ .../snapshots/3-Alignment-Error.shot | 3 +++ .../mixed-accessibility-modifiers/fixture.ts | 3 +++ .../snapshots/1-TSESTree-Error.shot | 10 +++++++++ .../snapshots/2-Babel-Error.shot | 3 +++ .../snapshots/3-Alignment-Error.shot | 3 +++ .../fixture.ts | 3 +++ .../snapshots/1-TSESTree-Error.shot | 10 +++++++++ .../snapshots/2-Babel-Error.shot | 3 +++ .../snapshots/3-Alignment-Error.shot | 3 +++ .../mixed-accessibility-modifiers/fixture.ts | 3 +++ .../snapshots/1-TSESTree-Error.shot | 10 +++++++++ .../snapshots/2-Babel-Error.shot | 3 +++ .../snapshots/3-Alignment-Error.shot | 3 +++ packages/typescript-estree/src/convert.ts | 21 +++++++++++++++++++ 17 files changed, 97 insertions(+) create mode 100644 packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/fixture.ts create mode 100644 packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/1-TSESTree-Error.shot create mode 100644 packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/2-Babel-Error.shot create mode 100644 packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/3-Alignment-Error.shot create mode 100644 packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/fixture.ts create mode 100644 packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/1-TSESTree-Error.shot create mode 100644 packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/2-Babel-Error.shot create mode 100644 packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/3-Alignment-Error.shot create mode 100644 packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/fixture.ts create mode 100644 packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/1-TSESTree-Error.shot create mode 100644 packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/2-Babel-Error.shot create mode 100644 packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/3-Alignment-Error.shot create mode 100644 packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/fixture.ts create mode 100644 packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/1-TSESTree-Error.shot create mode 100644 packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/2-Babel-Error.shot create mode 100644 packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/3-Alignment-Error.shot diff --git a/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/fixture.ts b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/fixture.ts new file mode 100644 index 000000000000..29db5140d271 --- /dev/null +++ b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/fixture.ts @@ -0,0 +1,3 @@ +class Foo { + public public bar() {}; +} diff --git a/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/1-TSESTree-Error.shot b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/1-TSESTree-Error.shot new file mode 100644 index 000000000000..49db5284df5a --- /dev/null +++ b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/1-TSESTree-Error.shot @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element MethodDefinition _error_ duplicated-accessibility-modifiers TSESTree - Error 1`] = ` +"TSError + 1 | class Foo { +> 2 | public public bar() {}; + | ^^^^^^ Accessibility modifier already seen. + 3 | } + 4 |" +`; diff --git a/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/2-Babel-Error.shot b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/2-Babel-Error.shot new file mode 100644 index 000000000000..e84a8adf3e77 --- /dev/null +++ b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/2-Babel-Error.shot @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element MethodDefinition _error_ duplicated-accessibility-modifiers Babel - Error 1`] = `[SyntaxError: Accessibility modifier already seen. (2:9)]`; diff --git a/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/3-Alignment-Error.shot b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/3-Alignment-Error.shot new file mode 100644 index 000000000000..d87e3076b189 --- /dev/null +++ b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/3-Alignment-Error.shot @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element MethodDefinition _error_ duplicated-accessibility-modifiers Error Alignment 1`] = `"Both errored"`; diff --git a/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/fixture.ts b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/fixture.ts new file mode 100644 index 000000000000..6d9a757a6c96 --- /dev/null +++ b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/fixture.ts @@ -0,0 +1,3 @@ +class Foo { + public protected bar() {}; +} diff --git a/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/1-TSESTree-Error.shot b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/1-TSESTree-Error.shot new file mode 100644 index 000000000000..adeb1e6df792 --- /dev/null +++ b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/1-TSESTree-Error.shot @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element MethodDefinition _error_ mixed-accessibility-modifiers TSESTree - Error 1`] = ` +"TSError + 1 | class Foo { +> 2 | public protected bar() {}; + | ^^^^^^^^^ Accessibility modifier already seen. + 3 | } + 4 |" +`; diff --git a/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/2-Babel-Error.shot b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/2-Babel-Error.shot new file mode 100644 index 000000000000..223e5193276e --- /dev/null +++ b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/2-Babel-Error.shot @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element MethodDefinition _error_ mixed-accessibility-modifiers Babel - Error 1`] = `[SyntaxError: Accessibility modifier already seen. (2:9)]`; diff --git a/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/3-Alignment-Error.shot b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/3-Alignment-Error.shot new file mode 100644 index 000000000000..957afbc76959 --- /dev/null +++ b/packages/ast-spec/src/element/MethodDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/3-Alignment-Error.shot @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element MethodDefinition _error_ mixed-accessibility-modifiers Error Alignment 1`] = `"Both errored"`; diff --git a/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/fixture.ts b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/fixture.ts new file mode 100644 index 000000000000..cfe758d6b422 --- /dev/null +++ b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/fixture.ts @@ -0,0 +1,3 @@ +class Foo { + public public bar; +} diff --git a/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/1-TSESTree-Error.shot b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/1-TSESTree-Error.shot new file mode 100644 index 000000000000..6fbf0b6b8290 --- /dev/null +++ b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/1-TSESTree-Error.shot @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element PropertyDefinition _error_ duplicated-accessibility-modifiers TSESTree - Error 1`] = ` +"TSError + 1 | class Foo { +> 2 | public public bar; + | ^^^^^^ Accessibility modifier already seen. + 3 | } + 4 |" +`; diff --git a/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/2-Babel-Error.shot b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/2-Babel-Error.shot new file mode 100644 index 000000000000..1285ca65797e --- /dev/null +++ b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/2-Babel-Error.shot @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element PropertyDefinition _error_ duplicated-accessibility-modifiers Babel - Error 1`] = `[SyntaxError: Accessibility modifier already seen. (2:9)]`; diff --git a/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/3-Alignment-Error.shot b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/3-Alignment-Error.shot new file mode 100644 index 000000000000..116d47b88301 --- /dev/null +++ b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/duplicated-accessibility-modifiers/snapshots/3-Alignment-Error.shot @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element PropertyDefinition _error_ duplicated-accessibility-modifiers Error Alignment 1`] = `"Both errored"`; diff --git a/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/fixture.ts b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/fixture.ts new file mode 100644 index 000000000000..a9715175b5ad --- /dev/null +++ b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/fixture.ts @@ -0,0 +1,3 @@ +class Foo { + public protected bar; +} diff --git a/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/1-TSESTree-Error.shot b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/1-TSESTree-Error.shot new file mode 100644 index 000000000000..0786548487bd --- /dev/null +++ b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/1-TSESTree-Error.shot @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element PropertyDefinition _error_ mixed-accessibility-modifiers TSESTree - Error 1`] = ` +"TSError + 1 | class Foo { +> 2 | public protected bar; + | ^^^^^^^^^ Accessibility modifier already seen. + 3 | } + 4 |" +`; diff --git a/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/2-Babel-Error.shot b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/2-Babel-Error.shot new file mode 100644 index 000000000000..309038c6d169 --- /dev/null +++ b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/2-Babel-Error.shot @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element PropertyDefinition _error_ mixed-accessibility-modifiers Babel - Error 1`] = `[SyntaxError: Accessibility modifier already seen. (2:9)]`; diff --git a/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/3-Alignment-Error.shot b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/3-Alignment-Error.shot new file mode 100644 index 000000000000..611da1f7d9ca --- /dev/null +++ b/packages/ast-spec/src/element/PropertyDefinition/fixtures/_error_/mixed-accessibility-modifiers/snapshots/3-Alignment-Error.shot @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element PropertyDefinition _error_ mixed-accessibility-modifiers Error Alignment 1`] = `"Both errored"`; diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 2fb094c1b589..3eb898abc8f7 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -3419,6 +3419,27 @@ export class Converter { ); } + // `checkGrammarModifiers` function in `typescript` + if ( + modifier.kind === SyntaxKind.PublicKeyword || + modifier.kind === SyntaxKind.ProtectedKeyword || + modifier.kind === SyntaxKind.PrivateKeyword + ) { + for (const anotherModifier of getModifiers(node) ?? []) { + if ( + anotherModifier !== modifier && + (anotherModifier.kind === SyntaxKind.PublicKeyword || + anotherModifier.kind === SyntaxKind.ProtectedKeyword || + anotherModifier.kind === SyntaxKind.PrivateKeyword) + ) { + this.#throwError( + anotherModifier, + `Accessibility modifier already seen.`, + ); + } + } + } + // `checkParameter` function in `typescript` if ( node.kind === SyntaxKind.Parameter && From b7cef73129f1a227febe3624c18215a4f1e6c28c Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:24:04 +0300 Subject: [PATCH 091/165] test(eslint-plugin): assert that `ts`/`tsx` code blocks in docs are syntactically valid (#8142) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test(eslint-plugin): assert that `ts`/`tsx` code blocks in docs are syntactically valid * revert unintended changes in space-before-blocks.md * chore: shorten examples in consistent-type-assertions.md * refactor: do not parse md file again * docs: more consistent examples for consistent-type-assertions * docs: convert `js` code blocks to `ts` * Update packages/eslint-plugin/tests/docs.test.ts Co-authored-by: Josh Goldberg ✨ * chore: use regex instead of startsWith * chore: fix few codesamples --------- Co-authored-by: Josh Goldberg ✨ --- .../docs/rules/ban-tslint-comment.md | 4 +- .../docs/rules/consistent-type-assertions.md | 38 ++++++++++--------- .../rules/explicit-function-return-type.md | 12 ++---- .../rules/explicit-member-accessibility.md | 16 ++++---- .../docs/rules/member-ordering.md | 2 - .../docs/rules/no-empty-function.md | 3 -- .../docs/rules/no-for-in-array.md | 6 +-- .../eslint-plugin/docs/rules/no-this-alias.md | 4 +- .../eslint-plugin/docs/rules/no-type-alias.md | 32 ++++++++++------ .../rules/no-unnecessary-type-arguments.md | 4 +- .../rules/no-unnecessary-type-constraint.md | 2 +- .../docs/rules/prefer-enum-initializers.md | 2 +- .../eslint-plugin/docs/rules/prefer-for-of.md | 4 +- .../docs/rules/space-before-blocks.md | 7 +++- packages/eslint-plugin/docs/rules/typedef.md | 6 +-- packages/eslint-plugin/tests/docs.test.ts | 27 +++++++++++++ 16 files changed, 102 insertions(+), 67 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/ban-tslint-comment.md b/packages/eslint-plugin/docs/rules/ban-tslint-comment.md index eac42f6cdabf..c2529de6179f 100644 --- a/packages/eslint-plugin/docs/rules/ban-tslint-comment.md +++ b/packages/eslint-plugin/docs/rules/ban-tslint-comment.md @@ -16,7 +16,7 @@ Useful when migrating from TSLint to ESLint. Once TSLint has been removed, this ### ❌ Incorrect -```js +```ts /* tslint:disable */ /* tslint:enable */ /* tslint:disable:rule1 rule2 rule3... */ @@ -28,7 +28,7 @@ someCode(); // tslint:disable-line ### ✅ Correct -```js +```ts // This is a comment that just happens to mention tslint /* This is a multiline comment that just happens to mention tslint */ someCode(); // This is a comment that just happens to mention tslint diff --git a/packages/eslint-plugin/docs/rules/consistent-type-assertions.md b/packages/eslint-plugin/docs/rules/consistent-type-assertions.md index b453e7201aa6..7bd4412470e5 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-assertions.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-assertions.md @@ -54,22 +54,22 @@ Examples of code for `{ assertionStyle: 'as', objectLiteralTypeAssertions: 'neve #### ❌ Incorrect ```ts option='{ "assertionStyle": "as", "objectLiteralTypeAssertions": "never" }' -const x = { ... } as T; +const x = { foo: 1 } as T; -function foo() { - return { ... } as T; +function bar() { + return { foo: 1 } as T; } ``` #### ✅ Correct ```ts option='{ "assertionStyle": "as", "objectLiteralTypeAssertions": "never" }' -const x: T = { ... }; -const y = { ... } as any; -const z = { ... } as unknown; +const x: T = { foo: 1 }; +const y = { foo: 1 } as any; +const z = { foo: 1 } as unknown; -function foo(): T { - return { ... }; +function bar(): T { + return { foo: 1 }; } ``` @@ -82,23 +82,25 @@ Examples of code for `{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allo #### ❌ Incorrect ```ts option='{ "assertionStyle": "as", "objectLiteralTypeAssertions": "allow-as-parameter" }' -const x = { ... } as T; +const x = { foo: 1 } as T; -function foo() { - return { ... } as T; +function bar() { + return { foo: 1 } as T; } ``` #### ✅ Correct ```tsx option='{ "assertionStyle": "as", "objectLiteralTypeAssertions": "allow-as-parameter" }' -const x: T = { ... }; -const y = { ... } as any; -const z = { ... } as unknown; -foo({ ... } as T); -new Clazz({ ... } as T); -function foo() { throw { bar: 5 } as Foo } -const foo = ; +const x: T = { foo: 1 }; +const y = { foo: 1 } as any; +const z = { foo: 1 } as unknown; +bar({ foo: 1 } as T); +new Clazz({ foo: 1 } as T); +function bar() { + throw { foo: 1 } as Foo; +} +const foo = ; ``` diff --git a/packages/eslint-plugin/docs/rules/explicit-function-return-type.md b/packages/eslint-plugin/docs/rules/explicit-function-return-type.md index ad6b5598e557..2d02e06bdf01 100644 --- a/packages/eslint-plugin/docs/rules/explicit-function-return-type.md +++ b/packages/eslint-plugin/docs/rules/explicit-function-return-type.md @@ -143,7 +143,7 @@ type FuncType = () => string; let arrowFn: FuncType = () => 'test'; -let funcExpr: FuncType = function() { +let funcExpr: FuncType = function () { return 'test'; }; @@ -163,19 +163,15 @@ let objectPropCast = { foo: () => 1, }; -declare functionWithArg(arg: () => number); +declare function functionWithArg(arg: () => number); functionWithArg(() => 1); -declare functionWithObjectArg(arg: { method: () => number }); +declare function functionWithObjectArg(arg: { method: () => number }); functionWithObjectArg({ method() { return 1; }, }); - -const Comp: FC = () => { - return